Debian packaging for django-admin-rangefilter
Go to file
Dmitriy Sokolov 651a43cc25
Prepare 0.3.15
2019-04-14 19:37:52 +03:00
docs/images Init commit 2016-06-24 13:17:49 +03:00
rangefilter Prepare 0.3.15 2019-04-14 19:37:52 +03:00
.gitignore Updated translation 2019-01-31 12:42:21 +03:00
.travis.yml Fix travis dist 2019-04-05 14:27:49 +03:00
CHANGES Update language from transifex 2019-04-14 19:32:29 +03:00
LICENSE Init commit 2016-06-24 13:17:49 +03:00
MANIFEST.in Init commit 2016-06-24 13:17:49 +03:00
Makefile Refactoring templatetags 2019-01-30 14:50:03 +03:00
README.rst Fix README 2019-04-10 16:43:40 +03:00
runtests.py Compatibility Django 2.1 2019-04-05 14:16:13 +03:00
setup.py Update changelog 2018-12-05 09:54:10 +03:00

README.rst

.. image:: https://travis-ci.org/silentsokolov/django-admin-rangefilter.svg?branch=master
   :target: https://travis-ci.org/silentsokolov/django-admin-rangefilter

.. image:: https://codecov.io/gh/silentsokolov/django-admin-rangefilter/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/silentsokolov/django-admin-rangefilter

django-admin-rangefilter
========================

django-admin-rangefilter app, add the filter by a custom date / datetime range on the admin UI.

.. image:: https://raw.githubusercontent.com/silentsokolov/django-admin-rangefilter/master/docs/images/screenshot.png


Requirements
------------

* Python 2.7+ or Python 3.4+
* Django 1.8+


Installation
------------

Use your favorite Python package manager to install the app from PyPI, e.g.

Example:

``pip install django-admin-rangefilter``


Add ``rangefilter`` to ``INSTALLED_APPS``:

Example:

.. code:: python

    INSTALLED_APPS = (
        ...
        'rangefilter',
        ...
    )


Example usage
-------------

In admin
~~~~~~~~

.. code:: python

    from django.contrib import admin
    from rangefilter.filter import DateRangeFilter, DateTimeRangeFilter


    @admin.register(Post)
    class PostAdmin(admin.ModelAdmin):
        list_filter = (
            ('created_at', DateRangeFilter), ('updated_at', DateTimeRangeFilter),
        )