Skip to main content

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

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-filter-0.5.3.tar.gz (15.1 kB view details)

Uploaded Source

File details

Details for the file django-filter-0.5.3.tar.gz.

File metadata

File hashes

Hashes for django-filter-0.5.3.tar.gz
Algorithm Hash digest
SHA256 3918a6309f0ed940cb17f67e13ad6d224518f0a0cdbc189254c6e5a36e2b6b79
MD5 2afb919bf8b7808186e19ef10d7bbfe0
BLAKE2b-256 1c4ebaa0cce93a8bbfe4e213485aa46c84802414c947bedd09fe9544f9957473

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page