In my Django application, I want to use select_related() in a QuerySet to "follow" a ForeignKey , but I only need to access multiple fields of the "follow" model instance. Can I use the defer() method somehow with my "follow" field.
for example, if I have ...
class BarModel(models.Model): ... blah = models.TextField() class FooModel(models.Model): bar = models.ForeignKey(BarModel) ...
... and I do FooModel.objects.all().select_related('bar') as I can defer() the blah field.
Thanks.
source share