Anonymous
I created a model Tutorial with title, description, published as the fields
Anonymous
But after migration it is taking only the default Id and Description fields
Anonymous
Database is MongoDB and I want to retrieve the data but this model is not working I mean migrating ??
Anonymous
What to do ?
Anonymous
I deleted and again done makemigrations but no use
Anonymous
Init.py migration file always taking the default Id and published fields only
Umar
First check whether all fields are created in table or not
Harish
If you're using something like a non-relational database such as Mongo, would there even be a need for migrations?
Harish
What library are you using to connect it to Mongo?
Anonymous
What library are you using to connect it to Mongo?
I have not mentioned just gave the database connection
Anonymous
https://bezkoder.com/django-mongodb-crud-rest-framework/
Anonymous
Following this blog I am new to djnago and rest API
Umar
Not created
That is the problem. Debug your code
Anonymous
MongoDB is also bit confusing
Ahmed
Oh, I just can use 'me' as entity
꧁❦ I'm Farooq ❦꧂
Can any one help me to get idea about realtime environment
Uday
so i have 2 different models, product sub category and product both of them have product_id which i want to use to link both of the models together
Uday
what would be the logic for that?
Uday
what would be the logic for that?
everything's already made and product_id is not connected via foreign key but are individual charfields,
Manish
+50 Bounty https://stackoverflow.com/questions/66645325/how-to-handle-a-patch-request-for-a-nested-serializer
Agent Q
!admin
Astrapel
/report
Astrapel
!report
Hamouda
i have a class Client( User ) == > i need a Client to be created when ever a User get created PS: i was checking some solution for Profile but they use OneToOne relation between them and not inheritance
Vishnu
Can anyone help me with how to upload csv files in Django rest framework for a specific model
Vishnu
Please let me know
Agent Q
Can anyone help me with how to upload csv files in Django rest framework for a specific model
https://dev.to/djangotricks/how-to-upload-a-file-using-django-rest-framework-1kgf
pranit
Hey guys. Does anyone know how to integrate Django in azure, can anyone help me with that
Agent Q
Bro if its a csv file ???
Whats the diff? You send data inside the body of the post request and store it in static
Agent Q
Hey guys. Does anyone know how to integrate Django in azure, can anyone help me with that
Wrong search term. Google "Deploy Django to Azure"
Вячеслав
Guys, how can I force django to apply migrations for both databases
Вячеслав
Without --databasename
Talha
How to download instagram image from url , i used urlib it gives me 403 Error , can someone tell me whats the solution ?
Hamouda
am using django rest and as far as i know it's working, but nothing is being passed to the client ( no username passed )
Gourav
When I try to send mail using django in server it gives ConnectionRefusedErrot : [Error 111] Connection refused Please help me to resolve this issue😭
Gourav
It's completely fine when run on local server but in deployment server it gives error. What I do🙏
Вячеслав
okay, maybe somebody knows how can I migrate all db during tests?
Anonymous
Anonymous
May I know what are you trying to achieve?
My bad. I should have scrolled up a bit 😁
Вячеслав
May I know what are you trying to achieve?
sure thing! I defined two databases (default, deleted). for some reasons I need to migrate both of them when I start tests
Вячеслав
it seems like only one (default) database has migrated when i started tests
Anonymous
it seems like only one (default) database has migrated when i started tests
True, because that is the defined behaviour of migrate command unless specify --database option.
Вячеслав
True, because that is the defined behaviour of migrate command unless specify --database option.
yep, but I really need to have both of them migrated during tests
Anonymous
A suggestion if it seems feasible to you. You can subclass DiscoverRunner and then in setup_databases you can use call_command to run migration on both your databases from there.
Anonymous
You can check up on DiscoverRunner on django documentation site somewhere under advanced testing.
Anonymous
😁
Вячеслав
You can check up on DiscoverRunner on django documentation site somewhere under advanced testing.
Okay, thanks a lot! I just wanna be sure there is no way doing this without Runner)
Anonymous
Sure thing. If there is one, that would be great.
A
Any recommended playlist for Django forms from youtube?
Prince
Any recommended playlist for Django forms from youtube?
https://www.youtube.com/watch?v=6oOHlcHkX2U&list=PLEsfXFp6DpzTD1BD1aWNxS2Ep06vIkaeW&index=23
Uday
im taking value from a particular key from list of dictionaries but its saving the value type as generator object, how can i make sure its saving it as int or str?
Uday
saving values in a list as generator object type*
Randy
I write the form in the template like this: <div> Picture {{form.image}} </div> <div> Heading {{form.title}} </div> <div> Description {{form.description}} </div> and writes that the id field is required And if I write simply {{ form }} then it's ok to change the shape I need to write the fields separately, but in this case an error will pop up :(
Andrew
My staticfiles fail to dispay no the webpage after app deployment
Yerbolat
Hello everyone
Yerbolat
Did anybody marketplace with django?
Doragonsureiyā
🚫 ‎𝕱𝖑𝖆𝖒𝖒𝖆_ꟻ [1220854030] is already banned.
Anonymous
Django Rest API developer??
Doragonsureiyā
Django Rest API developer??
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 ~90,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
Doragonsureiyā
Did anybody marketplace with django?
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 ~90,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
Андрей
Did you run collectstatic?
Randy
Description of the problem: The MainPage model must have an SEO record. Therefore, the view checks to see if the .seo (FK) field has a record number. If not, it creates an SEO record, adds it to the MainPage record, and saves the MainPage. It seems that everything is saved, printed in the view, but when I send in the form with the context to the page, the MainPage record does not have an SEO record number. Also, when returning (POST method) when saving, it is clear that I receive a new object from the form. Shorthand: dpaste Full view in project: github
Anonymous
read the docs, examples explain
A
Description of the problem- The main page has 4 blocks with each block having a form associated with it .But i can't display all the four forms in the same page.It shows one form only out of four forms.
Owolabi
how can i insert data into different tables based on request data from single endpoint in Django and DRF? Thanks in advance
Owolabi
And I want to maintain single responsibility principle pls help me out