diff options
author | Moritz Sichert <moritz.sichert@googlemail.com> | 2015-09-09 15:09:59 +0200 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2015-09-16 14:43:38 -0400 |
commit | 8550161e531a603d57723850fb09c4c9b7ca60b9 (patch) | |
tree | c44aef4f19294937f07eaa9c641749753fce0060 /django/forms/utils.py | |
parent | 0603f09318049e67320121ace035b7ab03f88ca3 (diff) | |
download | django-8550161e531a603d57723850fb09c4c9b7ca60b9.tar.gz |
Refs #25294 -- Moved BoundField to django.forms.boundfield.
Diffstat (limited to 'django/forms/utils.py')
-rw-r--r-- | django/forms/utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/django/forms/utils.py b/django/forms/utils.py index 3d87afd8c9..dc4df86058 100644 --- a/django/forms/utils.py +++ b/django/forms/utils.py @@ -16,6 +16,13 @@ except ImportError: # Python 2 from UserList import UserList +def pretty_name(name): + """Converts 'first_name' to 'First name'""" + if not name: + return '' + return name.replace('_', ' ').capitalize() + + def flatatt(attrs): """ Convert a dictionary of attributes to a single string. |