I had a use case where I wanted to defer a field by default. I used the get_queryset function in the manger like this to make it always happen.
def get_queryset(self):
return super().get_queryset().defer('bigfield')
It seems to work, however it introduces some very strange side effects by changing the class name as described
here. I would get errors like
TemplateDoesNotExist: my_app/my_model_deferred_bigfield_detail.html
Clearly class based views are getting confused by the Model class name. Before I report a bug I wanted some general thoughts on the matter. Am I abusing the get_queryset method in my manager?
I had some issues from other apps too like django-activity-stream. Presumably a common way of generates model names isn't working with defer.