diff --git a/AUTHORS b/AUTHORS index 6c1a9070fe..28456d3814 100644 --- a/AUTHORS +++ b/AUTHORS @@ -51,6 +51,7 @@ answer newbie questions, and generally made Django that much better: Matt Croydon Jonathan Daugherty (cygnus) Jason Davies (Esaj) + Alex Dedul deric@monowerks.com Jeremy Dunck Clint Ecker 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',