Django Custom Query

django-custom-query is a python module to write user provided search queries, using AND, OR and parenthesis grouping. This module will translate those to Django ORM Q objects.

Install

$ pip3 install django-custom-query

django-custom-query was developed and tested on Python 3.5. Is based on sqlparse.

Source

Source can be downloaded as a tar.gz file from http://pypi.python.org/pypi/django-custom-query

Using git you can clone the source from http://github.com/lfagundes/django-custom-query.git

django-custom-query is free and open for usage under the MIT license.

API Reference

Contributing

Please submit bugs and patches, preferably with tests. All contributors will be acknowledged. Thanks!

Credits

django-custom-query was created by Luis Fagundes and was sponsored by Spatial Datalyst.

Changelog

  • 0.4.0
    • Support for IS NULL and IS NOT NULL queries
  • 0.3.0
    • Support for annotations
    • Support for date formatting
    • NOT operator
    • IN operator
  • 0.2.0
    • Support for filters on models.ForeignKey fields
  • 0.1.0
    • Initial release, with support for integer and char fields, =, >, <, <=, <=, <>, !=, AND, OR, BETWEEN and parenthesis.