Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

Simple list_filter that offers filtering by __isnull.

Project description

https://badge.fury.io/py/django-isnull-list-filter.svg https://travis-ci.org/petrdlouhy/django-isnull-list-filter.svg?branch=master https://codecov.io/gh/petrdlouhy/django-isnull-list-filter/branch/master/graph/badge.svg

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


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-isnull-list-filter-0.1.0.tar.gz (17.3 kB) Copy SHA256 hash SHA256 Source None Apr 26, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page