Dishant
So I can take a look if possible though I can help🙂
Anonymous
Does anyone knows about python library which takes care of login password reset Activation email and stuff we see on standard websites
Daniel
Does anyone knows about python library which takes care of login password reset Activation email and stuff we see on standard websites
https://dj-rest-auth.readthedocs.io/en/latest/introduction.html#features Check out it's features
Anonymous
Django PDF pls
Anonymous
Hi, I'm using postman for API testing I'm able to login I also tested a post request... It worked find But on next post request it's somehow showing CSRF failed Csrftoken is already in the headers Does anyone know what may be the possible reasons for that?
Cacio Lucas
Django PDF pls
I'm using django wkhtmltopdf
Anonymous
When I will logout in the website and press back button I am able to page where login is required
Anonymous
how to prevent back button after logout in django
Michael the wolf 🐺
I think there is some permanent redirect or something
Mirco
I will try this way
No, the login required is enough The back will trigger your view to check if the user is authenticated or not If not, it redirects to the login page
Mirco
Share the code with pastebin
Anonymous
Mirco
You are passing many=True but you are passing to the serialised only one object This is the reason of the error
Mirco
If you check package, it should be a dictionary like and not a list
Mirco
https://stackoverflow.com/questions/58471261/django-rest-framework-expected-a-list-of-items-but-got-type-queryset SO reference
Anonymous
Mirco
Na it's many to many relationship its not only 1 its a list of items
I know that it's a m2m but you are passing a dict like ( Queryset ) instead of a list That's the reason of the error.
Anonymous
So is there a way to solve it ?
Anonymous
Aight, thx tho
Mirco
TL;DR if you remove the .values() it should work But I did not try your code so, it's just an hypothesis
Beast
Hello guys
Beast
I need help with my Django project database
Beast
Anyone please reply who can help?
Doragonsureiyā
I need help with my Django project database
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z" Just ask about your problem directly! With ~80,000 people here, the probability that someone will help is pretty high. How to ask smart questions: http://catb.org/~esr/faqs/smart-questions.html
ken
hi. is it possible to display a standard 404 page in development mode
Sai Krupa Reddy
How to stop change or disable switch of tab's in present django
ELYAS
Hi, in class Meta what's the duty of ordering
Prateek
hi. is it possible to display a standard 404 page in development mode
You need to set debug = false , on true there is no way
ADI
Hello everyone can anyone help me with the html code .i wanna to make my search bar to right corner but float : right and text allign is now working
foscraft
Hello, am making a permits application form and the fields applicants are supposed to fill are 56. After filling all the fields the applicant should submit and the records should go direct to an email other than being saved in a db. Am using the django.core.email extension but it doesn’t work because the send_mail feature doesn’t support more than arguments and I have 56 of them. Which feature should I use ?
Uday
I've made some changes to my html file (added a word) and it's not reflecting on the website. I've used gunicorn, nginx to serve the website
Uday
What could be going on?
Uday
You should restart gunicorn and nginx
im using supervisor to take care of gunicorn can u help with how can i do it as i couldnt find anything which is related to supervisor
watson
Hi, I’m new to Django i have so many doubts on implementing advanced database methods. In Django models. can you please help me.? Thanks for your help.
Doragonsureiyā
Hi, I’m new to Django i have so many doubts on implementing advanced database methods. In Django models. can you please help me.? Thanks for your help.
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
Uday
can anyone help me with whats wrong in the file?
h
Hello guys, I'm contributing to an open source project and they want me to write swagger api documentation, I tried to search on internet but I'm getting confused. I get to know that with "swagger inspector" we can generate documentation but I'm confused on how to use it, can someone please give me some hint? Thanks in advance
Anonymous
Hi! Someone here to explain multi vendor module in python?
Lucid
Itr = models.objects.aggregate(Count("name"))
Lucid
I'm calling this in the model Terms this is the right method ?
Mirco
I'm calling this in the model Terms this is the right method ?
You need to use Terms.objects. Not models.objects
Lucid
You need to use Terms.objects. Not models.objects
But in that case it gives error that same model is in the model
Lucid
https://del.dog/ahunusitot.txt
Lucid
What's wrong with this code it is not writing the Total in the database column named "Total"
Mirco
https://del.dog/ahunusitot.txt
Wait totally wrong place
Mirco
You cannot handle it in this way, write a python property or a normal method to return the aggregation
Lucid
I am not getting it
Mirco
Could you please more elaborate
You cannot write the query where Django expects a column Every attribute of the Model will be a column in your database
Mirco
You have to write a method that will return the result of your query O a python property ( I mean @property )
Lucid
And then store in the column named as Total how can I do that
Mirco
And then store in the column named as Total how can I do that
The Total column has to be an Integer Field And then you can retrieve the aggregate value and save inside it
Mirco
Based on your code, u need to study better Python and Django for sure
Mirco
Your code is not PEP8 compliant based on the syntax u have used
Lucid
Okay got your point
Lucid
If once I populate the Total can i get this as a list ? In my same model
Sumit
How to automatically trigger an event on addition of records on database in django and postgresql
Krishna
Hello I'm building site which have one news box where i want to show latest news first but default django model entries shows latest entry in last what should i do for my correct output?
Mirco
Anyone?
1 - You can change model ordering inside Meta 2 - You can change ordering via ORM