Koen de
Alexander
Deepak
Can i change model name and field(relationship) of abstract user and manager name ??
Deepak
I want to change the name of custom user and remove their relation
Deepak
Can i do this ?
奈姆
Deepak
Like any foreign key relation.
Deepak
Yes, i want to change the name of custom model(table).
Doragonsureiyā
Hamia
I just wanna ask about good courses to learn Django and Django rest framework or I must focus on the documentation is it enough !
Alexander
Hey guys, please advice
I have a DB table (in Frontend for costumer it looks similar to Excel table). Every year customer should start a new "list", and fill it in. So the question is about the better way of implementing. Simple idea is just store "year" field in each entry, and then filter data in templates. So maybe exists any way to do it better, any ideas? Thank you
Hamia
'cause am flutter dev and I wanna learn framework for making the back end to my app 😞 I think Django is the best cauz it s big app and big data what do u think guys ?
Олег
Hello. Tell me how to use the django-access library. (https://github.com/nnseva/django-access)
Yathish
clouded
clouded
Олег
clouded
In fact, it's quite likely that people will tell you their opinions about other frameworks, which is nothing that should be discussed here.
Олег
How can I differentiate access to different instances of the same object? This is not possible in Django, did I understand correctly?
Charly
Maxim
ZeroCool
Hi everybody, have anyone implemented jwt in drf with a CustomUser? I get the token but when I use axios or fetch from my frontend I got an credentials error, it's weird because the token is valid
Praveen
ZeroCool
djangorestframework_simplejwt 5.4.0
شهرزاد محمد
in drf how to prevent requests from tools like postman
奈姆
User-Agent request header gives you info about the client. But, that can be spoofed/fake. To protect api endpoints, you can implement auth and rate limiting.
شهرزاد محمد
奈姆
yes via the Authorization request header.
Luis Fernando
Hello guys, have you ever seen this error when installing Django and Oracle database on a Linux Server? django.db.utils.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory"
Luis Fernando
I already have installed the instaclient.
Doragonsureiyā
choyon
Is there any playlist where from I can learn django from beginner to advance?
Alessandro
In DRF, I have a User and Profile serializer to create new users in the sign up. I was thinking to pass all the data like
{'username': 'fakeuser1', 'email': 'fake@fake.org', 'first_name': 'Fake', 'last_name': 'Last name', 'password': 'fakepass', 'password2': 'fakepass', 'profile': {'state': 859, 'postal_code': '3143424', ... < all the other profile fields > }
My question is, what is the best way to handle Profile validation inside User serializer, in order to prevent creating a user instance without a profile instance.
The Inspired
Don't do validation in UserSerializer. you can do it inside a simple fuction-based view to check that, or if you know how to override viewsets, do it inside ProfileViewset
The Inspired
I usually dont touch user-related stuff...
whatever operations you want to do on User, you can do it on Profile and make a one-to-one link between user and profile
Shubham
Any Good resource to learn django and rest framework and jwt.?
And what other resources you can recommend?
Synthwave
Nandu
Hi, I need to add a chat feature to my project. Does anyone have any idea how to do it?
Yahya
in my django ecommerce project when i login i got some error as ( JSONDecodeError) is there anyone to help me to fix this
Doragonsureiyā
in my django ecommerce project when i login i got some error as ( JSONDecodeError) is there anyone to help me to fix this
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain:
- what you're doing
- what you're expecting
- what you're using
- where you're running the script
- what Python version you're using
- what packages and their versions you're using
- and the most important thing: show the code YOU wrote (read rule 5️⃣ for that)
and more details, that way your chances to get help will increase.
S
Yahya
i am creating a ecommerce project using django and recently i have adedd a feature that will delete the user cart from data base when the order is placed, after that i logout, then when i login i got an error (JSONDecodeError)
Maxim
Олег
How can I differentiate access to different instances of the same object? This is not possible in Django, did I understand correctly?
There is user_1, user_2 and user_3. User_1 creates an instance of the Post object. User_2 should see this Post, and user_3 does not have access to this Post.
奈姆
“Permissions can be set not only per type of object, but also per specific object instance.”
https://docs.djangoproject.com/en/5.1/topics/auth/default/#permissions-and-authorization
Олег
Yahya
when i changed my database from sqlite to postresql in railway.app i got some error
django.db.utils.OperationalError: connection to server at "postgres-ob4r-production.up.railway.app" (35.213.168.149), port 5432 failed: Connection timed out (0x0000274C/10060)
Is the server running on that host and accepting TCP/IP connections?
could you help me to fix this
Charly
Yahya
Are you trying to connect to the database from your PC or inside railway?
my project is in my pc i want to make my database in cloud and tried to connect my project database to railway.app postgresql when i runserver i got this error
django.db.utils.OperationalError: connection to server at "postgres-ob4r-production.up.railway.app" (35.213.168.149), port 5432 failed: Connection timed out (0x0000274C/10060)
Is the server running on that host and accepting TCP/IP connections?
Charly
Charly
(you can but most cases is not recommended)
Yahya
could you suggest what should i do
Netsi Man
use python-dotenv and hide your secret key.
Doragonsureiyā
could you suggest what should i do
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://dpaste.org, https://hastebin.com, https://bin.kv2.dev or your favorite one!
Yahya
Charly
Charly
locally means your PC
Yahya
when i tried the same i got the error
django.db.utils.OperationalError: connection to server at "postgres-ob4r-production.up.railway.app" (35.213.168.149), port 5432 failed: Connection timed out (0x0000274C/10060)
Is the server running on that host and accepting TCP/IP connections?
Charly
Charly
Yahya
if i push the project to github and host the project in railway.app am i able to use the railway.app/postgresql DB
M...
Hello everyone!
I am new in Django
So can you suggest me that which plateform and website is good for learn Django
Swamy
Hey
I am using abstract base use model when I registered the user through portman password hasing but when try to django Admin panel password is not hasing it is showing plan text
hamid
hamid