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.

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
    ...

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.1 (2026-11-13)

  • Switched the build backend from setuptools to hatchling and moved the package to the src layout. The import path filters is unchanged.

  • Moved the test suite out of the package into the top-level tests directory; tests are no longer shipped in the wheel or sdist.

  • Removed the example project.

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.1

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.1
File Size Uploaded Provenance Actions
django_filters_mixin-0.2.1.tar.gz 6.3 kB With provenance Details for django_filters_mixin-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 10.7 kB

Release files / django_filters_mixin-0.2.1.tar.gz

Download URL django_filters_mixin-0.2.1.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5b16c618dce4f77a6b3545ca62c11eb0cab0108244876ab7bf626df2d590b0f4
BLAKE2b-256 checksum
How to use checksums
7ccc7c6b8dd721a2e3abd1b0deac242f36c11d8003e87030b106191fdbbe7191
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 13, 2026.

Transparency log

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

Download URL django_filters_mixin-0.2.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9deebbe96dbcfbc740bccaa2af56ad306c3b60b937e29fb8330ce29376faf0a3
BLAKE2b-256 checksum
How to use checksums
d54578a06392cf78eacc1b1dabcedd5de49a09a5c8cfbb6d6b92db52363f5f1e
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 13, 2026.

Transparency log

Security for django-filters-mixin 0.2.1

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.1.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 13, 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