Debian packaging for django-filter
Go to file
Florian Apolloner 0e4b3d703b Small license changes (acknowledge individual contributors). 2012-10-21 09:22:30 +02:00
django_filters Change timezone fallback to datedate.now alias. 2012-10-15 22:04:56 +02:00
docs Added Sphinx conf.py and Makefile, fixes #57. 2012-09-17 11:28:41 +02:00
.gitignore Added Sphinx conf.py and Makefile, fixes #57. 2012-09-17 11:28:41 +02:00
.travis.yml Merge pull request #60 from onepercentclub/django-1.3-compat 2012-10-20 05:04:05 -07:00
AUTHORS.txt Add missing contributors 2012-10-12 20:51:17 +01:00
LICENSE Small license changes (acknowledge individual contributors). 2012-10-21 09:22:30 +02:00
MANIFEST.in Make sure templates are included when installing with setup.py 2009-11-27 23:28:12 -06:00
README.rst Small license changes (acknowledge individual contributors). 2012-10-21 09:22:30 +02:00
runtests.py Use runtests.py style for tests 2012-10-12 20:40:36 +01:00
setup.py Use rst not markdown. (sob) 2012-10-12 20:18:54 +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.3+

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

Install using pip::

    pip install -e git+https://github.com/alex/django-filter.git#egg=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