django1/django/db/migrations
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
..
operations Simplified AlterModelTable by making it subclass ModelOptionOperation. 2019-08-02 18:19:55 +02:00
__init__.py Implement swappable model support for migrations 2014-01-19 16:43:12 +00:00
autodetector.py Fixed #30691 -- Made migrations autodetector find dependencies for foreign keys altering. 2019-09-03 14:45:49 +02:00
exceptions.py Removed unnecessary trailing commas and spaces in various code. 2017-12-28 21:07:29 +01:00
executor.py Refs #30186 -- Changed MigrationRecorder.applied_migrations() to return a dict. 2019-03-07 19:36:55 -05:00
graph.py Refs #29784 -- Switched to https:// links where available. 2018-09-26 08:48:47 +02:00
loader.py Refs #30186 -- Changed MigrationRecorder.applied_migrations() to return a dict. 2019-03-07 19:36:55 -05:00
migration.py Simplified various __eq__() methods. 2017-09-28 09:18:37 -04:00
optimizer.py Removed in_between from Operation.reduce()'s signature. 2018-07-11 10:49:50 -04:00
questioner.py Capitalized "Python" in docs and comments. 2018-10-09 09:26:07 -04:00
recorder.py Refs #30186 -- Changed MigrationRecorder.applied_migrations() to return a dict. 2019-03-07 19:36:55 -05:00
serializer.py Fixed #27910 -- Added enumeration helpers for use in Field.choices. 2019-09-04 14:42:49 +02:00
state.py Fixed #30159 -- Removed unneeded use of OrderedDict. 2019-02-06 13:48:39 -05:00
utils.py Refs #23919 -- Stopped inheriting from object to define new style classes. 2017-01-19 08:39:46 +01:00
writer.py Fixed #30147 -- Simplified directory creation with os.makedirs(..., exist_ok=True). 2019-01-31 12:53:36 -05:00