{"id":13415733,"url":"https://github.com/carltongibson/django-filter","last_synced_at":"2025-05-13T11:08:08.422Z","repository":{"id":491384,"uuid":"117741","full_name":"carltongibson/django-filter","owner":"carltongibson","description":"A generic system for filtering Django QuerySets based on user selections","archived":false,"fork":false,"pushed_at":"2025-03-26T13:37:27.000Z","size":2599,"stargazers_count":4576,"open_issues_count":71,"forks_count":771,"subscribers_count":65,"default_branch":"main","last_synced_at":"2025-05-05T20:53:12.642Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://django-filter.readthedocs.io/en/main/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carltongibson.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2009-01-30T00:35:57.000Z","updated_at":"2025-05-04T16:35:00.000Z","dependencies_parsed_at":"2023-01-13T10:23:22.765Z","dependency_job_id":"f4f35783-1dfa-4bfa-873c-83de60f46e69","html_url":"https://github.com/carltongibson/django-filter","commit_stats":{"total_commits":1034,"total_committers":217,"mean_commits":4.764976958525345,"dds":0.7756286266924565,"last_synced_commit":"2494df96c6387a9fa411fcb00b696b15dfd9216b"},"previous_names":["alex/django-filter"],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carltongibson%2Fdjango-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carltongibson%2Fdjango-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carltongibson%2Fdjango-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carltongibson%2Fdjango-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carltongibson","download_url":"https://codeload.github.com/carltongibson/django-filter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253193075,"owners_count":21869029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T21:00:51.715Z","updated_at":"2025-05-13T11:08:08.378Z","avatar_url":"https://github.com/carltongibson.png","language":"Python","funding_links":[],"categories":["Third-Party Packages","Python","Release Features","Django Utilities","Databases \u0026 ORM"],"sub_categories":["General","Podcasts"],"readme":"Django Filter\n=============\n\nDjango-filter is a reusable Django application allowing users to declaratively\nadd dynamic ``QuerySet`` filtering from URL parameters.\n\nFull documentation on `read the docs`_.\n\n.. image:: https://raw.githubusercontent.com/carltongibson/django-filter/python-coverage-comment-action-data/badge.svg\n    :target: https://github.com/carltongibson/django-filter/tree/python-coverage-comment-action-data\n\n.. image:: https://badge.fury.io/py/django-filter.svg\n    :target: http://badge.fury.io/py/django-filter\n\n\nVersioning and stability policy\n-------------------------------\n\nDjango-Filter is a mature and stable package. It uses a two-part CalVer\nversioning scheme, such as ``21.1``. The first number is the year. The second\nis the release number within that year.\n\nOn an on-going basis, Django-Filter aims to support all current Django\nversions, the matching current Python versions, and the latest version of\nDjango REST Framework.\n\nPlease see:\n\n* `Status of supported Python versions \u003chttps://devguide.python.org/versions/#supported-versions\u003e`_\n* `List of supported Django versions \u003chttps://www.djangoproject.com/download/#supported-versions\u003e`_\n\nSupport for Python and Django versions will be dropped when they reach\nend-of-life. Support for Python versions will be dropped when they reach\nend-of-life, even when still supported by a current version of Django.\n\nOther breaking changes are rare. Where required, every effort will be made to\napply a \"Year plus two\" deprecation period. For example, a change initially\nintroduced in ``23.x`` would offer a fallback where feasible and finally be\nremoved in ``25.1``. Where fallbacks are not feasible, breaking changes without\ndeprecation will be called out in the release notes.\n\n\nInstallation\n------------\n\nInstall using pip:\n\n.. code-block:: sh\n\n    pip install django-filter\n\nThen add ``'django_filters'`` to your ``INSTALLED_APPS``.\n\n.. code-block:: python\n\n    INSTALLED_APPS = [\n        ...\n        'django_filters',\n    ]\n\n\nUsage\n-----\n\nDjango-filter can be used for generating interfaces similar to the Django\nadmin's ``list_filter`` interface.  It has an API very similar to Django's\n``ModelForms``.  For example, if you had a Product model you could have a\nfilterset for it with the code:\n\n.. code-block:: python\n\n    import django_filters\n\n    class ProductFilter(django_filters.FilterSet):\n        class Meta:\n            model = Product\n            fields = ['name', 'price', 'manufacturer']\n\n\nAnd then in your view you could do:\n\n.. code-block:: python\n\n    def product_list(request):\n        filter = ProductFilter(request.GET, queryset=Product.objects.all())\n        return render(request, 'my_app/template.html', {'filter': filter})\n\n\nUsage with Django REST Framework\n--------------------------------\n\nDjango-filter provides a custom ``FilterSet`` and filter backend for use with\nDjango REST Framework.\n\nTo use this adjust your import to use\n``django_filters.rest_framework.FilterSet``.\n\n.. code-block:: python\n\n    from django_filters import rest_framework as filters\n\n    class ProductFilter(filters.FilterSet):\n        class Meta:\n            model = Product\n            fields = ('category', 'in_stock')\n\n\nFor more details see the `DRF integration docs`_.\n\n\nSupport\n-------\n\nIf you need help you can start a `discussion`_. For commercial support, please\n`contact Carlton Gibson via his website \u003chttps://noumenal.es/\u003e`_.\n\n.. _`discussion`: https://github.com/carltongibson/django-filter/discussions\n.. _`read the docs`: https://django-filter.readthedocs.io/en/main/\n.. _`DRF integration docs`: https://django-filter.readthedocs.io/en/stable/guide/rest_framework.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarltongibson%2Fdjango-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarltongibson%2Fdjango-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarltongibson%2Fdjango-filter/lists"}