python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Get Django to return related objects
I'm trying to filter one table and obtain the related rows from another table as a nested object.
Models are as follow:
class KpiArea(models.Model):
harvest = models.CharField(max_length=45)
a...
dizzydizzy
Votes: 0
Answers: 1
Django ORM prefetch field from manual join table on many-to-many relationship
I'm facing an n-plus-1 query explosion after changing a Django model and I think it is because I am having to re-query for fields from a manual join table
As a stripped-down example
class Dashboard(mo...
Paul D'Ambra
Votes: 0
Answers: 1
Django ORM Query to get number of currently subbed user
I use an Event log that tracks subscriptions and unsubscriptions to given mailing lists.
My objective is to hit the database one time (sqlite) to get the number of subscribed users, I don't need the o...
Benjamin_Mourgues
Votes: 0
Answers: 1
Why on_delete of Django Rest Framework not work as expected on Image and File Fields?
When I delete the parent table using Django rest due to on_delete it deletes the child table also (due to foreign key) but the Image and File content of the child table not deleted.
I want to delete t...
Amol_G
Votes: 0
Answers: 2