Skip to content
This repository has been archived by the owner. It is now read-only.
django-filter meets django-pagination
Branch: develop
Clone or download
Latest commit 58987e6 Mar 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example fix #5 Mar 23, 2019
filters bump version number Oct 14, 2016
.gitignore updated .gitignore Jan 11, 2016
.landscape.yaml Create .landscape.yaml Sep 24, 2015
LICENSE update LICENSE Apr 26, 2015
MANIFEST.in configuree universal wheel building Jan 11, 2016
README.rst fixed a typo in README Jan 11, 2016
setup.cfg configuree universal wheel building Jan 11, 2016
setup.py fix #5 Mar 23, 2019

README.rst

django-filters-mixin

Simple integration between django-filter and pagination

Requirements

You must have django-filter installed and configured, see the django-filter documentation for details and setup instructions.

Installation

pip install django-filters-mixin

Usage

The FilterMixin allows to use pagination together with filtering

# views.py

import django_filters
from filters.views import FilterMixin


class CustomFilterSet(django_filters.FilterSet):
    # read https://github.com/alex/django-filter#usage
    ...


class CustomFilterView(FilterMixin, django_filters.views.FilterView):
    filterset_class = CustomFilterSet
    paginate_by = 12
    ...

Please see example application. This application is used to manually test the functionalities of this package. This also serves as good example...

You need Django 1.4 or above to run that. It might run on older versions but that is not tested.

You can’t perform that action at this time.