Debian packaging for django-admin-rangefilter
Go to file
Dmitriy Sokolov f8af1c7349
Prepare 0.3.12
2019-01-31 12:47:55 +03:00
docs/images Init commit 2016-06-24 13:17:49 +03:00
rangefilter Prepare 0.3.12 2019-01-31 12:47:55 +03:00
.gitignore Updated translation 2019-01-31 12:42:21 +03:00
.travis.yml Travis update 2018-10-12 15:15:18 +03:00
CHANGES Prepare 0.3.12 2019-01-31 12:47:55 +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 Add method override default timezone 2017-04-12 23:06:05 +03:00
runtests.py Avoid loading admin_static in templates under Django>=1.10 (#27) 2019-01-30 14:16:06 +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.3+
* 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),
        )