Changes between Initial Version and Version 1 of Ticket #17438
- Timestamp:
- Dec 22, 2011, 10:40:10 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #17438 – Description
initial v1 1 1 If the model name is SERVER_CONFIG then "Server r_config" will be displayed in the admin interface. 2 2 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 3 Bad line: django\db\models\options.py(20): 4 {{{ 5 get_verbose_name = lambda class_name: re.sub('(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))', ' \\1', class_name).lower().strip() 6 }}} 5 7 Reproduce in python prompt: 6 8 {{{ 7 9 >>> import re 8 10 >>> e = re.sub('(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))', ' \\1', "server_config").lower().strip() … … 12 14 >>> print e 13 15 serve r_config 14 16 }}} 15 17 Fix: 16 18 {{{ 17 19 get_verbose_name = lambda class_name: class_name.lower().replace("_"," ") 18 20 }}} 19 21 Best regards, 20 22