django1/django/db/models
Shai Berger 72ebe85a26 Fixed #27910 -- Added enumeration helpers for use in Field.choices.
These classes can serve as a base class for user enums, supporting
translatable human-readable names, or names automatically inferred
from the enum member name.

Additional properties make it easy to access the list of names, values
and display labels.

Thanks to the following for ideas and reviews:

Carlton Gibson, Fran Hrženjak, Ian Foote, Mariusz Felisiak, Shai Berger.

Co-authored-by: Shai Berger <shai@platonix.com>
Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2019-09-04 14:42:49 +02:00
..
fields Refs #28442 -- Adjusted related lookups handling of expression rhs. 2019-09-02 10:52:36 +02:00
functions Fixed #30602 -- Made Extract raise ValueError when using unsupported lookups for DurationField. 2019-07-12 08:08:35 +02:00
sql Fixed #30739 -- Fixed exclusion of multi-valued lookup against outer rhs. 2019-09-02 10:52:36 +02:00
__init__.py Fixed #27910 -- Added enumeration helpers for use in Field.choices. 2019-09-04 14:42:49 +02:00
aggregates.py Fixed #30665 -- Added support for distinct argument to Avg() and Sum(). 2019-07-31 11:22:50 +02:00
base.py Fixed #29260 -- Skipped an UPDATE when adding a model instance with primary key that has a default. 2019-08-19 13:28:35 +02:00
constants.py Refactored qs.add_q() and utils/tree.py 2013-03-13 10:44:49 +02:00
constraints.py Fixed #30062 -- Added support for unique conditional constraints. 2019-01-12 09:50:20 -05:00
deletion.py Fixed #30339 -- Made Model.delete(keep_parents=True) preserves nested parent reverse relationships. 2019-05-06 13:04:31 +02:00
enums.py Fixed #27910 -- Added enumeration helpers for use in Field.choices. 2019-09-04 14:42:49 +02:00
expressions.py Refs #25367 -- Simplified OrderBy and Lookup by using Case() instead of RawSQL() on Oracle. 2019-08-29 11:56:12 +02:00
indexes.py Fixed #21039 -- Added AddIndexConcurrently/RemoveIndexConcurrently operations for PostgreSQL. 2019-08-21 13:10:06 +02:00
lookups.py Refs #25367 -- Simplified OrderBy and Lookup by using Case() instead of RawSQL() on Oracle. 2019-08-29 11:56:12 +02:00
manager.py Fixed #28982 -- Simplified code with and/or. 2018-01-03 20:12:23 -05:00
options.py Fixed #30397 -- Added app_label/class interpolation for names of indexes and constraints. 2019-07-08 14:57:56 +02:00
query.py Added Query.is_sliced property. 2019-07-25 20:45:55 +02:00
query_utils.py Refs #30657 -- Made DeferredAttribute.__init__() to take a field instance instead of a field name. 2019-07-25 07:24:52 +02:00
signals.py Fixed imports per isort 4.3.0. 2018-02-01 09:29:46 +01:00
utils.py Refs #27656 -- Updated django.db docstring verbs according to PEP 257. 2017-02-28 09:17:27 -05:00