Debian packaging for django-filter
Go to file
Florian Apolloner d992f2f321 Fixed support for newer wheel versions. 2013-07-27 12:25:01 +02:00
django_filters Fixed the bug where filtering an integer against 0 returned the full query set. 2013-07-04 11:43:56 +02:00
docs documents URLs notes amended 2013-06-04 13:01:38 +01:00
requirements add coverage.py for travis tests and some import/pep8 cleanup 2013-02-25 17:13:39 -05:00
tests Failing test cases for filtering an integer against 0. 2013-07-04 11:28:57 +02:00
.gitignore Updated .gitignore 2013-03-12 19:21:09 +01:00
.travis.yml Cleanups for 0.6 final. 2013-03-25 15:54:14 +01:00
AUTHORS Added myself to author files 2013-05-31 12:45:25 +02:00
CHANGES.rst Cleanups for 0.6 final. 2013-03-25 15:54:14 +01:00
LICENSE Small license changes (acknowledge individual contributors). 2012-10-21 09:22:30 +02:00
MANIFEST.in Update MANIFEST.in 2013-03-26 11:29:05 -03:00
README.rst Update README.rst 2013-03-23 19:54:14 +01:00
runshell.py renamed test_django_filters to tests. 2013-03-12 19:38:12 +01:00
runtests.py Don't use discover runner on Django 1.6 2013-06-12 18:31:21 +02:00
setup.cfg Fixed support for newer wheel versions. 2013-07-27 12:25:01 +02:00
setup.py Increased version to 0.7a0 2013-03-25 16:06:01 +01:00

README.rst

Django Filter
=============

Django-filter is a reusable Django application for allowing users to filter
querysets dynamically.

Full documentation on `read the docs`_.

.. image:: https://secure.travis-ci.org/alex/django-filter.png?branch=master
   :target: http://travis-ci.org/alex/django-filter

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

* Python 2.6+
* Django 1.4.5+

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

Install using pip::

    pip install django-filter

Or clone the repo and add to your PYTHONPATH::

    git clone git@github.com:alex/django-filter.git

Usage
-----

Django-filter can be used for generating interfaces similar to the Django
admin's ``list_filter`` interface.  It has an API very similar to Django's
``ModelForms``.  For example, if you had a Product model you could have a
filterset for it with the code::

    import django_filters

    class ProductFilter(django_filters.FilterSet):
        class Meta:
            model = Product
            fields = ['name', 'price', 'manufacturer']


And then in your view you could do::

    def product_list(request):
        filter = ProductFilter(request.GET, queryset=Product.objects.all())
        return render_to_response('my_app/template.html', {'filter': filter})

Support
-------

If you have questions about usage or development you can join the
`mailing list`_.

.. _`read the docs`: https://django-filter.readthedocs.org/en/latest/
.. _`mailing list`: http://groups.google.com/group/django-filter