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.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-mongoengine-filter-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0f7ae0dd8cf516bda90a89dfb955f2c1d4285e73e3251af56b73c75c58b43f4 |
|
MD5 | 461d9bd7038760ecc973bbe65b463da7 |
|
BLAKE2b-256 | 470a266a6bb4a15e1ca53b833cd91134b0519d28f47b89e834d58b2aa66fa088 |
Close
Hashes for django_mongoengine_filter-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd0128b39bcb93616f522b4f8825ef4dfbde876daf1224ffd8197a282156ddb5 |
|
MD5 | 6ed4c45de219bc8a09e80bcc7a7cf6ba |
|
BLAKE2b-256 | 2a5f4fce04e73b0b9e184876f032df5ba71af99dbc3a8f44ad169e938856c0ae |