.
because s3 will consist s2 which consist s1 which consist s3 which consist s2... etc.
.
infinite loop
Tema
I can see it...
Tema
it’s a pity
.
I recommend to make s1_base, s2_base, s3_base without any depth serializers
.
and make s1(inherited from s1_base), place s3_base inside it
.
get it?
.
and so on
Tema
Yeah, I think I’ve got the idea.. thanks
Tema
I already solve it another way, by the way
Tema
I’ve put them in different files, and importing them...
.
then will be circular import, will be error...
Tema
hm… I see
Tema
ok, thanks
SatyendraN
Hi Guys, I am a new to this grp. I am learning django for web development. Currently I am working on small project. But I am facing a problem in my project. Can anyone help me out here ? Thanks
SatyendraN
Here is the link of my questions
SatyendraN
https://stackoverflow.com/questions/55110873/how-to-make-required-fields-optional-in-django-form-for-super-user
Guillermo
https://stackoverflow.com/questions/55110873/how-to-make-required-fields-optional-in-django-form-for-super-user
One idea is to have two forms one with all the required fields and another without the restriction and use one or another if request.user.is_superuser or not
Guillermo
https://stackoverflow.com/questions/55110873/how-to-make-required-fields-optional-in-django-form-for-super-user
Another is to pass the user or the value of is_superuser to the form and inside its init method modify the fields with required = False
Anonymous
hi guys how can gnrate another database when i use migrate in project(exacly like sqlite3)
Anonymous
i had some porblem with mysql when i want bullid my DB in django
entropy
Hi guys, can anyone please help me find which file in django code does the email sending to ADMINS when 500 error occured? TIA
inchidi
Hi guys, can anyone please help me find which file in django code does the email sending to ADMINS when 500 error occured? TIA
here i guess https://docs.djangoproject.com/en/2.2/topics/email/#django.core.mail.mail_admins check this also https://docs.djangoproject.com/en/2.2/ref/settings/#admins
Anonymous
If you define a related name for a foreign key Model.foreignkey_set.all() won't work?
inchidi
If you define a related name for a foreign key Model.foreignkey_set.all() won't work?
should be model_object.foreignkey_set.all() instead the Model class tho
Ajay
Hey how to make searching at admin side
Ajay
Is there any any import statement for search_fields
syedj
Is there any way to do java scripts validation using django forms?
syedj
Like i want to change drop down to textbox on select
Mirco
Is there any way to do java scripts validation using django forms?
Frontend validation is like hitting to an already opened door Let django make your field validation
Anonymous
Hi good day, am having an issue with django wizard form
Anonymous
can anyone help me
Anonymous
these are my file i followed the documentation but when i want to save to a database it creates 3 invisble forms fields in the admin, i think its the other step in the form wizard but i want it to save as one
Anonymous
Hola
Mirco
Use pastebin or similar
Anonymous
https://pastebin.com/0y0mpJXr first_name and second name is not displaying?
Anonymous
Share view as well
https://pastebin.com/fRbdiZUU
Anonymous
last_name not second
its my typing fault, but first_name and last_name not displaying
Mirco
its my typing fault, but first_name and last_name not displaying
Type request.user.first_name and request.user.last_name and see what's happening Into your template profile.html
amit
can someone help solve one problem in Django with respect to pagination . In Infinite scroll Duplicacy is coming in Django feeds(similar fb feeds). How to solve duplicacy problem in Django .
Anonymous
Yup
not worked
Mirco
not worked
Got errors or not showed ?
Mirco
not showed
Are you logged in ?
Anonymous
yes, otherwise profile link won't open and username and email showing
Mirco
yes, otherwise profile link won't open and username and email showing
Check into your Django admin your user data If you don't see first_name and last_name , there are other problems
Mirco
i can see first_name and last_name from django admin site
Ok good Into your profile view try to print request.user to double check it's the correct one
Anonymous
Ok good Into your profile view try to print request.user to double check it's the correct one
new users details showing, but admin users is not showing wait i didint add first_name and second_name to admin user
Anonymous
😑
🙈
Mirco
🙈
That's why I told you to double check your admin side Is now working ?
amit
Use distinct() in your queryset
Due to infinite scroll it is taking same object for post .
Mirco
thank you
Yw 😁 Anyway, if you wanna a user profile, add a Profile model
Mirco
Due to infinite scroll it is taking same object for post .
What are you using for making infinite scroll ?
Oleg
Due to infinite scroll it is taking same object for post .
Track id or timestamp of the last item in user's feed. Then don't request next page, but request next N items after the given id or timestamp or whatever field they are ordered by.
Anonymous
What are you using for making infinite scroll ?
We r Waypoint.js and django paginator
Anonymous
*using
Nivya
Can anyone help me out with simple django project
Anders (izzno / gooood) 🇳🇴
Can anyone help me out with simple django project
That's kind of like asking if anyone can help you get to the moon. Specific questions will give you specific answers ;)
Anders (izzno / gooood) 🇳🇴
Oh tats great tqs a lot good answer
Np, have a good weekend (learning Django)