Changes between Initial Version and Version 1 of Ticket #17438


Ignore:
Timestamp:
12/22/11 22:40:10 (3 years ago)
Author:
gabrielhurley
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17438

    • Property Patch needs improvement unset
    • Property Needs tests unset
    • Property Needs documentation unset
  • Ticket #17438 – Description

    initial v1  
    11If the model name is SERVER_CONFIG then "Server r_config" will be displayed in the admin interface.
    22
    3 Bad line: django\db\models\options.py(20): get_verbose_name = lambda class_name: re.sub('(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))', ' \\1', class_name).lower().strip()
    4 
     3Bad line: django\db\models\options.py(20):
     4{{{
     5get_verbose_name = lambda class_name: re.sub('(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))', ' \\1', class_name).lower().strip()
     6}}}
    57Reproduce in python prompt:
    6 
     8{{{
    79>>> import re
    810>>> e =  re.sub('(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))', ' \\1', "server_config").lower().strip()
     
    1214>>> print e
    1315serve r_config
    14 
     16}}}
    1517Fix:
    16 
     18{{{
    1719get_verbose_name = lambda class_name: class_name.lower().replace("_"," ")
    18 
     20}}}
    1921Best regards,
    2022
Back to Top