Skip to content

amineck/django-filter-mongoengine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Filter Monogoengine

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

Full documentation on read the docs.

image

Requirements

  • Python 2.6+
  • Django 1.4.5+

Installation

Install using pip:

pip install django-filter-mongoengine

Or clone the repo and add to your PYTHONPATH:

git clone git@github.com:surfeurX/django-filter-mongoengine.git

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})

About

A Django-filter for Mongoengine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages