Skip to main content

Django Q Filter

Project description

Django Q Filter

build-status-image coverage-status-image pypi-version

complex filtering based on Django Q


Use the power of Django Q Objects to filter django models with complex queries. Django Q Filter provides filter forms (based on bootstrap and jQuery) and utils for complex query filters.

The filter form selects the possible django model fields dynamically and computes a Q-Query with the given input. Q-Filter Wizard

the resulting queryset is automatically annotated with the field and values of the given Q-Query. results of a Q-Query are always a "joined" style list and to enhance the experience, a normalized result set can be computed, where the values can be merged.

Q-Filter Wizard

For demo purposes, an example project is provided.


  • Python (3.6, 3.7, 3.8, 3.9)
  • Django (2.2, 3.0, 3.1)
  • django-crispy-forms


Install using pip...

pip install django-q-filter

Add 'qfilter' to your INSTALLED_APPS setting.


Use Q-Filter mixin in django views. See example project.

# example/food/

class RecipeListView(QQueryViewMixin, ListView):
    Recipe List View
    model = Recipe
    template_name = 'food/recipe_list.html'
    ordering = ['name']

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-q-filter, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size django_q_filter-0.1-py3.8.egg (22.5 kB) File type Egg Python version 3.8 Upload date Hashes View
Filename, size django_q_filter-0.1-py3-none-any.whl (28.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-q-filter-0.1.tar.gz (26.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page