1. Luke Plant
  2. django-easyfilters
  3. Issues
Issue #4 new

filterlabel tightly-coupled to verbose_name

evildmp
created an issue

As far as I can tell, https://bitbucket.org/spookylukey/django-easyfilters/src/f9be90ff64d7cd9d641c9f4e71a5bd7a8c1b7e55/django_easyfilters/filterset.py?at=default#cl-73 couples the filterlabel very tightly to the field's verbose_name.

This ought to be easy to override, but in fact I don't see a way to achieve it without creating a new Filter class and re-writing some chunks of it.

I'll have a go at providing this if you think it's worth doing.

Comments (1)

  1. Luke Plant repo owner

    Definitely worth doing, and should be fairly simple. I would just add a 'label' keyword argument to the Filter class, with logic that defaults to verbose_name, and this should be done inside Filter rather than in FilterSet.

    Obviously docs would be nice if you are interested in doing this!

    Thanks

  2. Log in to comment