Ticket #12434: 12841.patch

File 12841.patch, 432 bytes (added by Ales Zoulek, 15 years ago)

Using .capitalize()

  • django/forms/forms.py

    diff --git a/django/forms/forms.py b/django/forms/forms.py
    index 6f7a8ce..ea8790b 100644
    a b NON_FIELD_ERRORS = '__all__'  
    1919
    2020def pretty_name(name):
    2121    "Converts 'first_name' to 'First name'"
    22     name = name[0].upper() + name[1:]
     22    name = name.capitalize()
    2323    return name.replace('_', ' ')
    2424
    2525def get_declared_fields(bases, attrs, with_base_fields=True):
Back to Top