Avoid fetching table data in duplicate from ListView mixin#986
Conversation
|
The normal implementation of ListView fills beside the variable |
I'm trying to understand this, but grep is being uncooperative. Are you perchance referring to |
|
I mean, if I have a ListView for the model |
| from django.core.exceptions import ImproperlyConfigured | ||
| from django.views.generic.list import ListView | ||
| from django.views.generic.list import ( | ||
| MultipleObjectMixin as ConfoundingMultipleObjectMixin, |
There was a problem hiding this comment.
What is the reason for the alias? Can't we just do from django.views.generic.list import ListView, MultipleObjectMixin?
| similar, as presumably ListView.get_context_data is meant to fetch the | ||
| same data as this function will fetch directly. | ||
| """ | ||
| context = ( |
There was a problem hiding this comment.
If there are multiple overrides of get_context_data, this could skip more than just the MultipleObjectMixin.get_context_data that this PR tries to skip.
I feel as if the current implementation could have unintended breaking side-effects.
Fixes #914. Thank you for your consideration.