MongoEngine/mongoengine — pull request #117 by aljana (2012-09-05 21:09:23+00:00)
Title: Moved query operators to the top-level constants (like Django has them).

Query operators that were previously defined as local variables inside the QuerySet object are now defined as top-level constants.

This is needed because these operators have to be accessible by other libraries. One of them is Tastypie (RESTful API for Django) for MongoEngine.Tastypie only works with Django ORM but it can be extended to work with other data sources if a similiar interface is provided.

If you check Django ORM, you see that these query operators are defined as constants (https://github.com/django/django/blob/master/django/db/models/sql/constants.py#L5).

The library I mentioned is currently using hard-coded query operators but that's a stopgap solution so it would be really appreciated if you accept this request.