Ticket #12434: pretty_name_complete.diff
File pretty_name_complete.diff, 589 bytes (added by , 15 years ago) |
---|
-
django/forms/forms.py
18 18 NON_FIELD_ERRORS = '__all__' 19 19 20 20 def pretty_name(name): 21 "Converts 'first_name' to 'First name'" 22 name = name[0].upper() + name[1:] 23 return name.replace('_', ' ') 21 """Converts 'first_name' to 'First name'""" 22 if not name: 23 return u'' 24 return name.replace('_', ' ').capitalize() 24 25 25 26 def get_declared_fields(bases, attrs, with_base_fields=True): 26 27 """