Simple list_filter that offers filtering by __isnull.
Project description
Simple list_filter that offers filtering by __isnull.
Documentation
The full documentation is at https://django-isnull-list-filter.readthedocs.io.
Quickstart
Install Django isNull list_filter:
pip install django-isnull-list-filter
or use development version:
pip install -e git+https://github.com/PetrDlouhy/django-isnull-list-filter#egg=django-isnull-list-filter
Directly use it in your admin:
from isnull_filter import isnull_filter
class MyAdmin(admin.ModelAdmin):
list_filter = (
isnull_filter('author'), # Just set the field
isnull_filter('author', _("Hasn't got author")), # Or you can override the default filter title
)
Features
- Can be used on:
simple field
ForeignKeyField
related ForeignKeyField
ManyToManyField
OneToOneField
Default title can be overriden
Running Tests
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
Credits
Author:
Petr Dlouhý
Tools used in rendering this package:
History
0.1.0 (2017-04-26)
First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-isnull-list-filter-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbef8987173759b5513970acb849672a2b999fcace579986a172c7606f827924 |
|
MD5 | 51b4c1ff2c7fa2510115b1a313a9d93c |
|
BLAKE2b-256 | c5a3986f36b30b5eecbc6f8e3347624800553c9dbf2ab7f8593be9f9ab241200 |