Changes between Initial Version and Version 1 of Ticket #17438


Ignore:
Timestamp:
Dec 22, 2011, 10:40:10 PM (13 years ago)
Author:
Gabriel Hurley
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • 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