summaryrefslogtreecommitdiff
path: root/django/db/models/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/models/utils.py')
-rw-r--r--django/db/models/utils.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/django/db/models/utils.py b/django/db/models/utils.py
index c6cb5ef165..7f38bd7afb 100644
--- a/django/db/models/utils.py
+++ b/django/db/models/utils.py
@@ -67,3 +67,15 @@ class AltersData:
break
super().__init_subclass__(**kwargs)
+
+
+# RemovedInDjango70Warning: At the end of the deprecation, remove this function
+# and use .fields.BLANK_CHOICE_LABEL directly instead.
+def get_blank_choice_label():
+ from django.conf import settings
+
+ from .fields import BLANK_CHOICE_DASH, BLANK_CHOICE_LABEL
+
+ if settings.USE_BLANK_CHOICE_DASH:
+ return BLANK_CHOICE_DASH[0][1]
+ return BLANK_CHOICE_LABEL