The Inspired
Nope, i can't get plain text of password from database
Django doesn't store plain text passwords
cj
Nope, i can't get plain text of password from database
that's exactly how passwords should work
Abhie
Like user.objects.get('password')
cj
Like user.objects.get('password')
you'll get the "encrypted" password with that
pratik
Hint: foreignkey(unique=True)
Abhie
Django doesn't store plain text passwords
Yea I know that but I need plain text
Doragonsureiyā
Hint: foreignkey(unique=True)
What are you talking about?
pratik
What is this
pratik
Error Not working forginekey
cj
What is this
what are you talking about?
Abhie
Like generating OTP without phone or mail
cj
Like generating OTP without phone or mail
you can generate the random string, send to the user, then save it as password using django's password management, no need to store the plain text anywhere as it will be OTP. you just need to use a flag somewhere
Abhie
why? seriously, why?
Dude I want to store some random code as password and use the same code for authentication at the same time the user(creator) can see their generated password
pratik
This error
Any one know about this
Abhie
Hint: foreignkey(unique=True)
I don't think this will work for password authentication
Abhie
you don't need to render it
Then how will I show that generated code inorder to login again
cj
Then how will I show that generated code inorder to login again
show it to the user before saving it as password
Abhie
show it to the user before saving it as password
This might work, but it will mess my code thnx thoug
cj
This might work, but it will mess my code thnx thoug
wanting to have the password as plain text is a bigger and the worst mess actually
S@m
Hi i am a beginner..can u pls suggest some good resource..
Marc
Hi i am a beginner..can u pls suggest some good resource..
https://docs.djangoproject.com/en/4.1/intro/tutorial01/ https://www.youtube.com/c/Pyplane
Marc
Hi i am a beginner..can u pls suggest some good resource..
https://www.youtube.com/c/CodingEntrepreneurs/videos
Marc
Hi i am a beginner..can u pls suggest some good resource..
Django For Everybody - Full Python University Course https://www.youtube.com/watch?v=o0XbHvKxw7Y
Marc
Nothing.
Hello, I want projects in Django to become more experienced
Gopinath
Hello, I want projects in Django to become more experienced
Search for the complete projects developed using other technology (Eg: Java). Try to create those projects in Django
N
Guys, do validation methods (i.e. clean_<field>) in forms apply to non required fields if they're empty? Or do they work only if field is not empty?
Adrian
Hello, I want projects in Django to become more experienced
Hi, you can take some ideas from this page https://www.upgrad.com/blog/django-project-ideas-topics-beginners/
Wan
getimage = Mygalery() if request.method == "POST": getimage.image = request.POST.get('document', False) getimage.pk = None getimage.id = None getimage.save()
Wan
i'll post my image from html in database an local, but its not workted
Ibrahim
hello guys i need help in ORM query :
Ibrahim
i have model album has attribute ( is accepted and forign key for Artist ) i want to sort Artists base on the number of accepted albums for him i overrider the order_by function but it doesn't work code : https://ideone.com/yzzHMv
Ibrahim
this the query that i want to write in shell to sort the Artists ** Artist.object.order_by("approved_albums")
Adrian
Yo need to use the function annotate, you can see examples in https://docs.djangoproject.com/en/4.1/topics/db/aggregation/
Adrian
You need to add a count field, and then sort the query set with the new count field
Pouria²
hello guys I get a error while creating user in DRF can someone help me?
Pouria²
I encounter thia error : "EmailField object has no attribute strip"
Pouria²
I searched about it but can't reach the answer
Adrian
I encounter thia error : "EmailField object has no attribute strip"
That's strange, do you have any validation in your user's model or serializer?
Pouria²
yep
Pouria²
Adrian
Ok, send me a DM
Doragonsureiyā
Ok, send me a DM
Can i send you a private message? No. We do not provide one-on-one tutoring, hire someone if you need it. Questions are better answered in public so that everyone can learn.
𝙑𝙞𝙯 𝙋𝙖𝙡𝙖𝙨
What do you mean?
Pouria²
What do you mean?
i couldn't open the link
Maxim
What do you mean?
rule number 1 also applies to material on the links
Pouria²
What do you mean?
it isn't rstrip it is just strip
𝙑𝙞𝙯 𝙋𝙖𝙡𝙖𝙨
𝙑𝙞𝙯 𝙋𝙖𝙡𝙖𝙨
rule number 1 also applies to material on the links
Man , it's not on me I just found it in stack overflow of Russia
Pouria²
Can you send your model?
email = models.EmailField(unique=True)
Pouria²
Can you send your model?
thw other details of model is not nessacery
𝙑𝙞𝙯 𝙋𝙖𝙡𝙖𝙨
email = models.EmailField(unique=True)
Try to rename your var, also you need to specify max_length on EmailField
Grace
Hi, I have a ModelViewSet whose endpoint should wait for some results from an external api after payment has taken place, My question is how can i use async in DRF?
Abhie
Hi, how can I access urls of multiple apps for single project ?
Abhie
What are you talking about?
Like when I try to redirect am url from another app it throws an error page not found however atlast it says current path maches the last one
𝙑𝙞𝙯 𝙋𝙖𝙡𝙖𝙨
Hi, how can I access urls of multiple apps for single project ?
Define a var named as app_name ='YourAppName' in each urls.py for every app And you can access them like this : url('AppName:UrlNameSpace')
A
I start today django
A
But my first app was getting an error it said path not included but i m included it
A
So anyone here can share a idea
Mr Vgos
Fredrick
Hello guys how can I have a hash key generator for my Django app that whenever any user signs up , gets the key and uses the key as the password for future logins
Tура
Hi, the post is added automatically, after refreshing the page, I wanted to redirect user the same page
Bala
Hello Guys, do djongo will slow down my web application? Because I'm using Django Rest Framework + Mongodb + Djongo, evident that my docker container seeks restart then and there
Doragonsureiyā
Hello Guys, do djongo will slow down my web application? Because I'm using Django Rest Framework + Mongodb + Djongo, evident that my docker container seeks restart then and there
Do you want to use Django with MongoDB? Then you shouldn't Please read this article: https://daniel.feldroy.com/when-to-use-mongodb-with-django.html
Tура
How to solve location not found 302 error, from redirect
ford
Hello friends have anyone been able to deploy Geodjango app at Railways App. I keep on getting GDAL error no matter what i do.
For any who might face this issues use dockerfile, Railways uses if present for deployment