This is something I've regularly required and there doesn't seem to be any
third party package implementing this, but there are at least a few other
people having the need: https://stackoverflow.com/questions/37799694
/django-admin-list-filter-filter-field-by-is-empty-none-or-empty-string
https://gist.github.com/haplo/2695675 Note that while the filter could
easily live in a third party package, I think it makes sense to include it
in Django. It's not much code and I guess it's a common requirement.
--
Ticket URL: <https://code.djangoproject.com/ticket/28991>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Jonas Haag):
PR https://github.com/django/django/pull/9546
--
Ticket URL: <https://code.djangoproject.com/ticket/28991#comment:1>
Comment (by Tim Graham):
Duplicate of #28687?
--
Ticket URL: <https://code.djangoproject.com/ticket/28991#comment:2>
Comment (by Jonas Haag):
Not exactly here we're looking at
- a new filter for
- blank values
- of any kind of field (not necessarily relation fields)
#28687 is looking at
- an extension of an existing filter
- of null values
- that deals with relation fields
--
Ticket URL: <https://code.djangoproject.com/ticket/28991#comment:3>
* needs_docs: 0 => 1
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/28991#comment:4>
Comment (by Christophe Baldy):
Hi,
I tried to rework and improve and the original PR with my own PR
[https://github.com/django/django/pull/10599]
(This my first attempt to contribute to Django)
Thanks
--
Ticket URL: <https://code.djangoproject.com/ticket/28991#comment:5>
* owner: nobody => Basil Dubyk
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28991#comment:6>
* owner: Basil Dubyk => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/28991#comment:7>
* needs_docs: 1 => 0
* needs_better_patch: 0 => 1
Comment:
Left a few comments for improvements on the PR.
--
Ticket URL: <https://code.djangoproject.com/ticket/28991#comment:8>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/28991#comment:9>
* needs_better_patch: 0 => 1
Comment:
Commented on PR: Docs need some clarification. Possibly some extra tests
needed. (?) Needs updating to target v3.0.
--
Ticket URL: <https://code.djangoproject.com/ticket/28991#comment:10>
* owner: (none) => Federico Jaramillo Martínez
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28991#comment:11>
* needs_better_patch: 1 => 0
Comment:
PR https://github.com/django/django/pull/12239
--
Ticket URL: <https://code.djangoproject.com/ticket/28991#comment:12>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/28991#comment:13>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"372eaa395f167c038e546c6be554c96014d40109" 372eaa39]:
{{{
#!CommitTicketReference repository=""
revision="372eaa395f167c038e546c6be554c96014d40109"
Fixed #28991 -- Added EmptyFieldListFilter class in admin.filters.
Thanks Simon Charette and Carlton Gibson for reviews.
Co-Authored-By: Jonas Haag <jo...@lophus.org>
Co-Authored-By: Christophe Baldy <christop...@polyconseil.fr>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28991#comment:14>