A few questions and comments.

- The potentially huge performance hit would need to be called out in the
documentation. Hit would be from more queries and less opportunities (more
complexity) to cache filter options.

- What should happen if not all of the filters on a ModelAdmin support
being incremental? Exception, allow some filters to yield empty results, or
some other behavior?

- It might be better to add a CSS class to the filter options that would
yield and empty result. Doing so would address Augustin's comment about
finding empty results as being useful and it allows changing a filter from
"Older than 6 months" to "Older than 1 month" without having to select
"All" in between. The options could be hidden with CSS to match the
proposed behavior.

Regards,
Michael Manfre








On Thu, Apr 18, 2013 at 1:19 PM, Przemysław Suliga <[email protected]>wrote:

> Hi,
>
> This ticket is about making `FieldListFilter`s specified in
> `ModelAdmin.list_filter` alive in sense that they change according to what
> is currently displayed in changelist.
>
> https://code.djangoproject.com/ticket/19755
>
> So these new (incremental) filters will contain only choices which when
> clicked will result in non-empty changelist.
>
> With submitted patch you can just add `list_filter_incremental = True` on
> your ModelAdmin. There are no UI changes - I don't have an opinion as to if
> there should be any.
>
> So is anyone into this idea? I'll be glad to improve the patch.
>
>
> -Przemek
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-developers?hl=en
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to