Improve view mixin #1409
james-emerton
started this conversation in
Ideas
Replies: 1 comment
-
Hi @james-emerton — thanks for the suggestion. This isn’t something I want to look at right now, but I’ve moved it over to the discussions, and will have a think about it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The current implementation of
FilterMixin
(undocumented) is not currently usable in my own class based views without a fair bit of boilerplate. I took a stab at improving it, which I will happily reshape into a PR if there is interest.FilterViewMixin
. This also makes it clear that this isn't a mixin for theFilter
class.filter
context variable is renamed tofilterset
for consistencyget_filterset()
no longer requires thefilterset_class
attributeget_filtered_queryset()
to retrieve the filtered querysetobject_list
with the filtered queryset inget_context_data()
get_table_data()
is implemented for compatibility with django-tables2SingleTableMixin
I've posted my current version as a gist: https://gist.github.com/james-emerton/8c7f23cdbe472bd6c1098692cd93436a
Beta Was this translation helpful? Give feedback.
All reactions