alex / django-filter
- Source
- Commits
- Network (14)
- Issues (10)
- Downloads (5)
- Wiki (1)
- Graphs
-
Tree:
dba0f38
commit dba0f38edb9bb04af14e4ca134bb163a3890afdf
tree 932565c9ecd2e5b9fa774602d2c39e68d6b9d165
parent 506a87a0e7c7768a5796b35cb33618749e47f02e
tree 932565c9ecd2e5b9fa774602d2c39e68d6b9d165
parent 506a87a0e7c7768a5796b35cb33618749e47f02e
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Thu Jan 29 15:21:10 -0800 2009 | |
| |
AUTHORS.txt | Sat Jun 20 12:05:41 -0700 2009 | |
| |
COPYRIGHT | Thu Jan 29 16:49:31 -0800 2009 | |
| |
MANIFEST.in | Wed Aug 12 16:00:00 -0700 2009 | |
| |
README.txt | Wed Aug 12 16:00:00 -0700 2009 | |
| |
django_filters/ | ||
| |
docs/ | ||
| |
setup.py | Tue Aug 25 09:33:23 -0700 2009 |
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,

