T2ABIZZ
Hello , how can i add this to the django rest when the owner add new product so i get his information?(the username and the phone number of the user who sent post methode). I have The user model and the product field
salar
T2ABIZZ
salar
I use jwt
simply use request.user in your views to get your user object
T2ABIZZ
Okay thank you.
salar
Sertaç
Hominini_Inside
Sayidbek
Good night, there!
I want my model auto-create slug for each song, and tried this:
https://stackoverflow.com/questions/50436658/how-to-auto-generate-slug-from-my-album-model-in-django-2-0-4
It didn't work for me.
Is it too old or I am wrong?
Arsen
In admin.py add a special class
Брат
import <your model>
admin.site.register(<your model>)
Брат
that is it
Jal ⬡
Hello guys, will you know of any tutorial that I can see that teaches me to make a model to put several images to the same product? I'm creating an ecommerce,
Jal ⬡
Sorry for my bad English
salar
EL
Old
Hello friends! How I can import to Postgres a csv table and import from SQLite.?
Old
Old
Andrej
Old
Thank you so much
Mihail
I just renewed django from 2 to 4 version. Can you help me, how can I back my admin pannel model view to state as in 2 version?
Нефор
No way
Нефор
This is the end
Mihail
😭
salar
Ali Hasan
Masoud
hi i have this error when use celery and rabbitmq error is: File "/code/orders/urls.py", line 2, in <module>
from . import views
File "/code/orders/views.py", line 5, in <module>
from .tasks import order_created
File "/code/orders/tasks.py", line 1, in <module>
from celery import task
ImportError: cannot import name 'task' from 'celery' (/usr/local/lib/python3.10/site-packages/celery/__init__.py)
Abdullah
Hello
Please how i can add discount system in django to ecommerce Web application
Abdullah
If there any tutorial or documents?
Phansivang
Someone please help with me Django Pagination with bootstrap the list number of Page not only previous and next page .
Doragonsureiyā
Kiran
Anvesh
Requiement: want to bypass the behaviour of datetime field created_at with auto_now=True, creating a model object.
Basically I want to migrate data from one table to another. The table at which I want to dump data, doesn’t store the created_at value of the source table data, rather it uses the time at which the new object is created.
Jal ⬡
hi guys
Jal ⬡
i have this : [15/May/2022 12:48:35] "GET /tienda/carrito/1?cantidad=12 HTTP/1.1" 200 12915
Jal ⬡
How do I get the variable 'cantidad' with its value?
Jal ⬡
i try whit request.GET.get('cantidad')
Jal ⬡
but when i print it say 'none'
Anonymous
request.query_params.get("cantidad")
Anonymous
Try this
Jal ⬡
well I leave this here in case someone could help me with this error please
https://es.stackoverflow.com/questions/534266/wsgirequest-object-has-no-attribute-query-params
Fariz
Jal ⬡
Jal ⬡
https://es.stackoverflow.com/questions/534266/wsgirequest-object-has-no-attribute-query-params
Mihail
are any ways to get all created by me apps_names? which are noted in AppConfig.name?
D
How to change different database in django
Akash
Denis
I swaped from SQLite3 to PostreSQL this way
Denis
Also you can see the documantation of database you want use
Shrikrushna
Shubham
Can you send you url.py and views.py code if you have written some earlier?
Doragonsureiyā
To share code or error tracebacks, use a pasting service, like:
- https://linkode.org
- https://dpaste.org
Anil
Can you update xml file without loosing
<?xml version="1.0"encoding="UTF-8"?>
Using etree module
Christian
That's just basic python, not Django. https://www.google.com/search?q=python+sort+dictionary+list
x
How send data django to Js 🙂
Baqer
x
How ?
Baqer
👑 Dharmzeey
Please
I have a model(Profile) that relies on the default User Model, it gets created whenever a new user registers.
But whenever I create a superuser , the Profile doesn't get created when then leads to error.
Please is there a way or any docs that explains how I can do it and when I createsuperuser, the Profile also get created
Kim
👑 Dharmzeey
Kim
Yes
What are you using? Django Signals?
👑 Dharmzeey
👑 Dharmzeey
I'll send my pastebin now
So you can help me
Kim
Would you mind if I see the code?!
👑 Dharmzeey
👑 Dharmzeey
The views.py and the urls.py
Kim
So you are creating a new user directly from ProfileCreateView, right?