summaryrefslogtreecommitdiff
path: root/django/db/models/options.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/models/options.py')
-rw-r--r--django/db/models/options.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/options.py b/django/db/models/options.py
index 196ccd952d..1023689a86 100644
--- a/django/db/models/options.py
+++ b/django/db/models/options.py
@@ -9,7 +9,7 @@ from bisect import bisect
import re
# Calculate the verbose_name by converting from InitialCaps to "lowercase with spaces".
-get_verbose_name = lambda class_name: re.sub('([A-Z])', ' \\1', class_name).lower().strip()
+get_verbose_name = lambda class_name: re.sub('(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))', ' \\1', class_name).lower().strip()
DEFAULT_NAMES = ('verbose_name', 'db_table', 'ordering',
'unique_together', 'permissions', 'get_latest_by',