Skip to main content

django-filters-mixin

https://badge.fury.io/py/django-filters-mixin.svg https://img.shields.io/pypi/pyversions/django-filters-mixin.svg https://img.shields.io/pypi/djversions/django-filters-mixin.svg https://github.com/bashu/django-filters-mixin/actions/workflows/test.yml/badge.svg

Simple integration between django-filter and pagination.

Maintained by Basil Shubin, and some great contributors.

Requirements

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

Installation

First install the module, preferably in a virtual environment. It can be installed from PyPI:

pip install django-filters-mixin

Usage

The FilterMixin allows to use pagination together with filtering: the page query parameter is removed from the data passed to the filterset, so it is never treated as a filter value.

# views.py

import django_filters
from django_filters.views import FilterView

from filters.views import FilterMixin


class CustomFilterSet(django_filters.FilterSet):
    # read https://django-filter.readthedocs.io/en/stable/guide/usage.html
    ...


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

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

Testing

The test suite uses pytest and pytest-django, and runs entirely against an in-memory SQLite database - no external database setup is required:

$ uv run --group dev pytest

For testing against the full matrix of supported Python and Django versions, install tox (pip install tox) and run tox from the source checkout:

$ tox

Contributing

If you’ve found a bug, implemented a feature or customized the template and think it is useful then please consider contributing. Patches, pull requests or just suggestions are welcome!

License

django-filters-mixin is released under the BSD license.

Changes

0.2.0 (2026-11-10)

  • Now requires Python 3.11+ and Django 5.2+. Python 2 and older Django versions are no longer supported.

  • Removed filters.__version__; use importlib.metadata.version("django-filters-mixin") instead.

  • Migrated packaging to pyproject.toml, added a pytest test suite, pre-commit hooks and GitHub Actions CI/release workflows.

  • Updated the example project to work with current Django versions.

0.1.4 (2016-10-14)

  • Updated to Django 1.10.x.

Metadata

Release files for django-filters-mixin 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-filters-mixin 0.2.0
File Size Uploaded Provenance Actions
django_filters_mixin-0.2.0.tar.gz 5.4 kB With provenance Details for django_filters_mixin-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-filters-mixin 0.2.0
File Interpreter ABI Platform Actions
django_filters_mixin-0.2.0-py3-none-any.whl Python 3 none any Details for django_filters_mixin-0.2.0-py3-none-any.whl

Total release size: 10.0 kB

Release files / django_filters_mixin-0.2.0.tar.gz

Download URL django_filters_mixin-0.2.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9c81d063b92fbe22c90265943f99321d1b04a45e175f1246549773a3c9a812d5
BLAKE2b-256 checksum
How to use checksums
567d83d9b9375ed7849eaeee065e530b46265f51bcbb43ce46a3854d836be3ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / django_filters_mixin-0.2.0-py3-none-any.whl

Download URL django_filters_mixin-0.2.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c949d73a338cb2cff4760bdfbe41ff9357f079d5e2399a819f1045621dc05cd
BLAKE2b-256 checksum
How to use checksums
6f10503dd3ba5c09650941563696d4140b345abb3206ca9e8456613fb67ecaa4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for django-filters-mixin 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for django_filters_mixin-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page