I have the Django admin configured with a TabularInline, and the inline
model has a ForeignKey reference to a third model. Every row in the inline
generates a new query to fetch all of the instances of the third model.
Here's an overview of my code:
# models.py
> from django.db import models
>
Greetings!
I'm trying to refactor a query to avoid using QuerySet.extra (as per the
recommendation here:
https://docs.djangoproject.com/en/1.9/ref/models/querysets/#extra)
Here's a simplified version of my code:
# testapp.models
class Parent(models.Model):
pass
class Child(models.Model):
2 matches
Mail list logo