Rohan
Handled xD
Rohan
Bare except and what not
Rohan
Hardly serves any purpose
Ajay
Ok thank you
Turtle_In_Hurry
POST {"user" : ["1", "2"]} im sending this manytomany field from postman but how to get it at backend from request object
Turtle_In_Hurry
DRF Question
Mirco
DRF Question
Into validated data
Python2411
show error message
where can I put my photo ?
Mirco
where can I put my photo ?
Use code sharing tool
Python2411
of my error. in which web site ?
Mirco
Or use sharing image tool
Balamurali
Any freelancers here?
Python2411
ok
Hesen Nivas
Balamurali
@GotHackedByHer please check your pm
Turtle_In_Hurry
Into validated data
No to save in database
Mirco
No to save in database
First you need the model
Turtle_In_Hurry
I have all things created
Turtle_In_Hurry
I created models
Turtle_In_Hurry
And just need to know how to save it after getting it from request object
Mirco
And just need to know how to save it after getting it from request object
Just create the new model instance with post data you for from request object
Turtle_In_Hurry
Model_name.object.create(email=email, name=name)
Turtle_In_Hurry
By this way i cam save normal field
Turtle_In_Hurry
But how about manytomany fields
Mirco
But how about manytomany fields
It's just a list , you need to add what you need
Mirco
Read better official docs about it
Aadhi
Anyone knows about MultiValueDictKeyError
Derrick
Anyone with this book RESTI API with DJANGO by William S Vincent
Ronald
Anyone with this book RESTI API with DJANGO by William S Vincent
https://www.amazon.co.uk/REST-APIs-Django-powerful-Python/dp/198302998X/ref=sr_1_fkmrnull_1?keywords=django+rest+api&qid=1552886309&s=gateway&sr=8-1-fkmrnull
Anonymous
Hi everyone
Mirco
Rainieri
Hi everyone
http://www.nohello.com/
Rangaraj
How to convert django query set to python list of list Format of the list something should be like this [ ['timestamp','Generation','forecast'], [2007-01-18 00:00,33.45,45.33], [2007-01-18 00:00,33.45,45.33], ] I need List of list output. First row of data tells the headers of the model table
Anonymous
I am writing an account app so users can authenticate Login, reset password .... I have a one to one relationship Profile for users Now I've added Google auth so users can log in with Google But the problem is that Google users won't have a profile so that's an Error when they request their profile How can I solve this?
Sam
How to render the bootstrap css and js in django
Include the bootstrap and js links in your base.html
Adonis
Yes I'm using social-auth-app-django
In the doc there is a way to make personalized configurations... Try to check if one of those method can help you..... I think associate_user can help you
Adonis
Just try to add a code there to create the user profile after it has been created by the plugins... I usually use django-all-auth to do that
Anonymous
Thank you, I'll read that But how about this: I added some code to view function that is called when user requests their profile In that view function I make a profile for user if hey don't have one Is it good practice? Is it considered bad a solution?
Anonymous
Personally I prefer to make user profiles the moment they sign up This sounds like a right solution
Mirco
Personally I prefer to make user profiles the moment they sign up This sounds like a right solution
Use Django signals to create a profile on new user signed up This is one of a good practices post_save signal sent by the User model
Rangaraj
Why do you want this result ?
Actually am using one common model to have actual and forecast data that is filtered with one field called type. I want to display the result in graphos line chart. Everything works fine if we give data in the above format. But problem is with conversion of the query set to list of list type. As per graphos manual we need to specify the first row as header information and first column will be taken for X axis.
Marcos
How can I change this default "Filter by Year" field when I use SimpleListFilter so that the default "Todos" = "all" option does not appear, but start with the actual years? https://imgur.com/Y0vbate
Um
yo ... isn't it ok to have static file on webpage instead of forms?
Um
first i thought i would make an models for forms . but then used html
Um
isn't that ok
Doug
What are you trying to accomplish
Um
onclick= location.href mailto:111@11.com
Um
but it opens outlook
Um
thought i would get away with html .. but i think i have to make a form😑
Doug
onclick= location.href mailto:111@11.com
Using a link with the mailto: directive will automatically tell the browser to try and send the email with the computer's associated email application
Luis
thought i would get away with html .. but i think i have to make a form😑
mailto links opens the default email client on client side... if you are trying to create a form and send an email from the server side you're on the wrong way
Anders (izzno / gooood) 🇳🇴
Great bundle... https://www.humblebundle.com/books/web-programming-oreilly-books
Carlos
Hi guys, I have a question, which is better for deployed django project. Amazon webbservice or azure?
אהיה
Hello guys
Anders (izzno / gooood) 🇳🇴
They even have a magic config (droplet with django preinstalled.)
Artyom
Hi! Why this query generate empty csv? (no column titles too): def report(self): report = RentAddres.objects.raw(""" SELECT id, name, snameplp, fnameplp, patronymicplp, identity_doc, serial_doc, number_doc, ogrn,inn FROM renter_renters LEFT JOIN renter_rentaddres ON renter_renters.id = renter_rentaddres.renters_id, renter_rentaddres.city; """) return djqscsv.render_to_csv_response(report)
Artyom
id columns in both models (primary keys) are automaticlly genereted by django (not defined in model)
Artyom
why do you use raw sql? use values from queryset
when I did something like this : report = Renters.objects.all().values('name','snameplp','fnameplp','patronymicplp','identity_doc', 'serial_doc', 'number_doc','ogrn','inn').union(RentAddres.objects.all().values('subject','city', 'street','house','housing','number_doc')) return djqscsv.render_to_csv_response(report)
Artyom
function returns csv with Renters objects only..
tk
Anyone give me Django project
tk
Guys anyone have Django project
tk
Please give me with source code
Artyom
Guys anyone have Django project
https://github.com/divio/django-polls
tk
Academic project anyone having