Is it possible to switch to a through model in one release? [duplicate]
This question already has answers here: How to add through option to existing ManyToManyField with migrations and data in django (3 answers) Closed 14 days ago. Assume I have those Django models: class Book(models.Model): title = models.CharField(max_length=100) class Author(models.Model): name = models.CharField(max_length=100) books = models.ManyToManyField(Book) I already have a production system with several objects and […]
How to optimize method with multiple query calls?
I have an event system in my app. Every time a user deletes/updates/creates and object a new event is created in the database with the info of the object and the type of event it is.
My Event model looks something like this:
How to get a joined latest object in django ORM?
I have two tables 1:N related.
How to correctly make a query to database with Django ORM?
I have stuck in how to write query to avoid for loops
ModuleNotFoundError: No module named ‘project_name’
I tried to make ‘load_data.py’ file, but error confound me.