Skip to main content

django-mongoengine-filter is a reusable Django application inspired from django-filter for allowing mongoengine users to filter querysets dynamically.

Project description

django-mongoengine-filter is a reusable Django application for allowing users to filter mongoengine querysets dynamically.

Full documentation on read the docs.

PyPI Version

Requirements

  • Python 3.5+

  • Django 2.1+

Installation

Install using pip:

pip install django-mongoengine-filter

Or from repository directly:

pip install https://github.com/barseghyanartur/django-mongoengine-filter/archive/master.zip

Usage

import django_filters_mongoengine

class ProductFilter(django_filters_mongoengine.FilterSet):
    class Meta:
        model = Product
        fields = ['name', 'price', 'manufacturer']

And then in your view you could do:

def product_list(request):
    filter = ProductFilter(request.GET, queryset=Product.objects.all())
    return render_to_response('my_app/template.html', {'filter': filter})

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-mongoengine-filter-0.1.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

django_mongoengine_filter-0.1-py3-none-any.whl (31.9 kB view hashes)

Uploaded Python 3

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