I\'ve created a model, and I\'m rendering the default/unmodified model form for it. This alone generates 64 SQL queries because it has quite a few foreign keys, and those in tur
You can create a custom manager, and simply override get_queryset for it to apply everywhere. For example:
get_queryset
class MyManager(models.Manager): def get_queryset(self): return super(MyManager, self).get_queryset().select_related('foo', 'bar')
(Prior to Django 1.6, it was get_query_set).
get_query_set