Ticket #12434: 12841_no_capitalize.patch

File 12841_no_capitalize.patch, 376 bytes (added by ales_zoulek, 5 years ago)

not using .capitalize()

  • django/forms/forms.py

    diff --git a/django/forms/forms.py b/django/forms/forms.py
    index 6f7a8ce..89e4e60 100644
    a b NON_FIELD_ERRORS = '__all__' 
    1919
    2020def pretty_name(name):
    2121    "Converts 'first_name' to 'First name'"
     22    if not name:
     23        return ''
    2224    name = name[0].upper() + name[1:]
    2325    return name.replace('_', ' ')
    2426
Back to Top