public
Description: A generic system for filtering Django QuerySets based on user selections
Homepage:
Clone URL: git://github.com/alex/django-filter.git
name age message
file .gitignore Thu Jan 29 15:21:10 -0800 2009 added gitignore and notes [alex]
file AUTHORS.txt Sat Jun 20 12:05:41 -0700 2009 Added another example to the documentation, tha... [alex]
file COPYRIGHT Thu Jan 29 16:49:31 -0800 2009 added BSD license [alex]
file MANIFEST.in Fri Nov 27 21:28:12 -0800 2009 Make sure templates are included when installin... [alex]
file README.txt Tue Dec 15 13:28:04 -0800 2009 Remove an extraneous query string. [alex]
directory django_filters/ Sat Nov 14 19:53:04 -0800 2009 Fixed #20. When you filter on a multiple choic... [alex]
directory docs/ Mon Oct 19 12:52:41 -0700 2009 Typos in documentation. [telenieko]
file setup.py Sun Nov 29 22:01:07 -0800 2009 Bump the version number for the small setup.py ... [alex]
README.txt
Django-filter is a reusable Django application for allowing users to filter
queryset dynamically.  It requires Python 2.4 or higher.  For usage and
installation instructions consult the docs directory.

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 ProductFilterSet(django_filters.FilterSet):
        class Meta:
            model = Product
            fields = ['name', 'price', 'manufacturer']


And then in your view you could do::

    def product_list(request):
        filterset = ProductFilterSet(request.GET or None)
        return render_to_response('product/product_list.html',
            {'filterset': filterset})


See the docs directory for more information.

If you have questions about usage or development you can join the
mailing list at: http://groups.google.com/group/django-filter