Skip to main content

django-filter meets django-pagination

Project description

django-filters-mixin

Simple integration between django-filter and pagination

https://img.shields.io/pypi/v/django-filters-mixin.svg https://img.shields.io/pypi/dm/django-filters-mixin.svg https://img.shields.io/github/license/bashu/django-filters-mixin.svg

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.

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-filters-mixin-0.1.4.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

django_filters_mixin-0.1.4-py2.py3-none-any.whl (4.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-filters-mixin-0.1.4.tar.gz.

File metadata

File hashes

Hashes for django-filters-mixin-0.1.4.tar.gz
Algorithm Hash digest
SHA256 d01c2ff208ef16f3a9d9d4f5e9746fcde23a82b582ee2b25485582e8d98e692b
MD5 ad322a57567a8435479fa667ad45448a
BLAKE2b-256 5538d7d0f3a7f96232c04501c7dc8283d292c7ef0e68ffbbc1d6a9fc08563b98

See more details on using hashes here.

File details

Details for the file django_filters_mixin-0.1.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_filters_mixin-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5cc93ed9c634c3f38708cba180449cf862b0258cb7fb80ccda98aa12eabd7ce4
MD5 d91ac514fa1f8938d16f27eaa6dff154
BLAKE2b-256 d02a2b9ecbbb7d79d338ca9a5b651c5eda981e8ed0d0e9787372c0715c1ecf9e

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