1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00
django/tests/model_fields
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
..
__init__.py
4x8.png
8x4.png
models.py Fixed #28393 -- Added helpful error messages for invalid AutoField/FloatField/IntegerField values. 2019-08-05 08:41:29 +02:00
test_autofield.py Fixed #29979, Refs #17337 -- Extracted AutoField field logic into a mixin and refactored AutoFields. 2019-08-20 09:22:25 +02:00
test_binaryfield.py Refs #27804 -- Used subTest() in BinaryFieldTests.test_set_and_retrieve. 2019-06-07 06:04:56 +02:00
test_booleanfield.py
test_charfield.py Fixed #27910 -- Added enumeration helpers for use in Field.choices. 2019-09-04 14:42:49 +02:00
test_datetimefield.py
test_decimalfield.py Fixed #30400 -- Improved typography of user facing strings. 2019-06-28 16:46:18 +02:00
test_durationfield.py Fixed #30400 -- Improved typography of user facing strings. 2019-06-28 16:46:18 +02:00
test_field_flags.py
test_filefield.py
test_filepathfield.py Fixed #29529 -- Allowed models.fields.FilePathField to accept a callable path. 2019-05-02 11:11:56 +02:00
test_floatfield.py Fixed #28393 -- Added helpful error messages for invalid AutoField/FloatField/IntegerField values. 2019-08-05 08:41:29 +02:00
test_foreignkey.py
test_genericipaddressfield.py
test_imagefield.py
test_integerfield.py Fixed #27910 -- Added enumeration helpers for use in Field.choices. 2019-09-04 14:42:49 +02:00
test_manytomanyfield.py
test_promises.py
test_slugfield.py
test_textfield.py
test_uuid.py Fixed #30400 -- Improved typography of user facing strings. 2019-06-28 16:46:18 +02:00
tests.py Fixed #30449 -- Fixed RelatedFieldListFilter/RelatedOnlyFieldListFilter to respect model's Meta.ordering. 2019-08-15 10:29:05 +02:00