Write Django model properties that can be used in database queries.
Project description
django-queryable-properties is a Django extension that allows to implement model properties which can be used in database queries performed via Django’s ORM.
Further information, including supported Python and Django versions as well as installation instructions, can be found in the documentation hosted by readthedocs.
Contributing and getting help
The GitHub repository is the central place to report bugs and get help using the GitHub issues as well as to contribute to the project via pull requests while following the guide on contributing.
Changelog
master (unreleased)
1.2.0 (2019-10-21)
Added a mixin that allows custom filters for queryable properties (both class- and decorator-based) to be implemented using multiple functions/methods for different lookups
Added some ready-to-use queryable property implementations (ValueCheckProperty, RangeCheckProperty) to simplify common code patterns
Added a standalone version of six to the package requirements
1.1.0 (2019-06-23)
Queryable property filters (both annotation-based and custom) can now be used across relations when filtering querysets (i.e. a queryset can now be filtered by a queryable property on a related model)
Queryset annotations can now refer to annotatable queryable properties defined on a related model
Querysets can now be ordered by annotatable queryable properties defined on a related model
Filters and annotations that reference annotatable queryable properties will not select the queryable property annotation anymore in Django versions below 1.8 (ordering by such a property will still lead to a selection in these versions)
Fixed unnecessary selections of queryable property annotations in querysets that don’t return model instances (i.e. queries with .values() or .values_list())
Fixed unnecessary fields in GROUP BY clauses in querysets that don’t return model instances (i.e. queries with .values() or .values_list()) in Django versions below 1.8
Fixed an infinite recursion when constructing the HAVING clause for annotation-based filters that are not an aggregate in Django 1.8
1.0.2 (2019-06-02)
The lookup parameter of custom filter implementations of queryable properties will now receive the combined lookup string if multiple lookups/transforms are used at once instead of just the first lookup/transform
Fixed the construction of GROUP BY clauses when annotating queryable properties based on aggregates
Fixed the construction of HAVING clauses when annotating queryable properties based on aggregates in Django versions below 1.9
Fixed the ability to pickle queries and querysets with queryable properties functionality in Django versions below 1.6
1.0.1 (2019-05-11)
Added support for Django 2.2
1.0.0 (2018-12-31)
Initial release
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
Hashes for django-queryable-properties-1.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55a2cfc81e5a8c582bd4da4d971dab8e82b95df9e19b0935228b604d96249ab9 |
|
MD5 | c904395adf0c1db2c77dbc9095d4fa25 |
|
BLAKE2b-256 | 5b16573e6f4b1ed239859abb6bedc7f238a3eacde285a65d183641901f19aa89 |
Hashes for django_queryable_properties-1.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86f6a66c38cabe5902c97818e5bcd7659a7e5582be3b980b8d5be0a1d295c575 |
|
MD5 | 67e6e1e58594aedc2d0767194beb2549 |
|
BLAKE2b-256 | b6a49fd67eb878024765b0346dda4ce4ae044ea30e129e4ad9503a7200497a78 |