ptone/django-predicate — pull request #3 by nosamanuel (2013-10-21 16:35:34+00:00)
Title: Merge downstream changes into django-predicate

This PR contains some changes I've introduced for another project. The main goal here is to allow you to A) store predicates in a database for later use and B) to use predicates to evaluate Django models serialized as dicts.

- Rewrites the eval logic to support evaluation of both Python dicts and Django models with equivalence
- Adds `to_dict` and `from_dict` serialization methods
- Allows comparison of P-objects for equality
- Adds an `__any` lookup that acts like the inverse of `__in`
- Removes unused `to_identifer` method (possibly backwards incompatible, though it wasn't documented)

Obviously, a lot of changes, so let me know which parts you want or don't want.