django1/django
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
..
apps Fixed #30159 -- Removed unneeded use of OrderedDict. 2019-02-06 13:48:39 -05:00
bin Reverted "Fixed #27878, refs #23919 -- Used python3 shebangs." 2017-03-07 10:10:32 -05:00
conf Refs #30426 -- Changed default SECURE_CONTENT_TYPE_NOSNIFF to True. 2019-08-18 13:17:49 +02:00
contrib Fixed #30747 -- Renamed is_safe_url() to url_has_allowed_host_and_scheme(). 2019-09-02 15:32:23 +02:00
core Fixed #30736 -- Added Storage.get_alternative_name() to allow customization. 2019-08-30 11:32:19 +02:00
db Fixed #27910 -- Added enumeration helpers for use in Field.choices. 2019-09-04 14:42:49 +02:00
dispatch Capitalized "Python" in docs and comments. 2018-10-09 09:26:07 -04:00
forms Improved error message when index in __getitem__() is invalid. 2019-07-23 20:12:08 +02:00
http Fixed CVE-2019-12781 -- Made HttpRequest always trust SECURE_PROXY_SSL_HEADER if set. 2019-07-01 07:48:04 +02:00
middleware Removed unnecessary assignments in various code. 2019-04-24 13:09:29 +02:00
template Fixed #27486 -- Fixed Python 3.7 DeprecationWarning in intword and filesizeformat filters. 2019-06-11 20:34:59 +02:00
templatetags Replaced loop with dictionary comprehension. 2018-12-19 17:31:48 -06:00
test Fixed #30677 -- Improved error message for urlencode() and Client when None is passed as data. 2019-08-11 20:15:23 +02:00
urls Fixed #29667 -- Prohibited whitespaces in path() URLs. 2019-08-20 11:53:10 +02:00
utils Fixed #29714 -- Allowed using ExceptionReporter subclass with AdminEmailHandler. 2019-09-04 08:40:46 +02:00
views Fixed #30747 -- Renamed is_safe_url() to url_has_allowed_host_and_scheme(). 2019-09-02 15:32:23 +02:00
__init__.py Bumped version; master is now 3.0 pre-alpha. 2019-01-17 10:50:24 -05:00
__main__.py Fixed #24857 -- Added "python -m django" entry point. 2015-09-07 19:54:32 -04:00
shortcuts.py Refs #25978 -- Removed shortcuts.render_to_response() per deprecation timeline. 2019-01-17 10:50:25 -05:00