1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #24858 -- Added support for get_FOO_display() to ArrayField and RangeFields.

_get_FIELD_display() crashed when Field.choices was unhashable.
This commit is contained in:
Hasan Ramezani
2019-11-07 15:35:33 +01:00
committed by Mariusz Felisiak
parent 8058d9d7ad
commit 153c7956f8
5 changed files with 84 additions and 1 deletions

View File

@@ -797,6 +797,11 @@ For example::
>>> p.get_shirt_size_display()
'Large'
.. versionchanged:: 3.1
Support for :class:`~django.contrib.postgres.fields.ArrayField` and
:class:`~django.contrib.postgres.fields.RangeField` was added.
.. method:: Model.get_next_by_FOO(**kwargs)
.. method:: Model.get_previous_by_FOO(**kwargs)