mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed #827 -- For admin list_display functions without a short_description, Django now converts underscores to spaces. Thanks, Aaron Swartz
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -361,7 +361,7 @@ def change_list(request, app_label, module_name):
|
||||
try:
|
||||
header = func.short_description
|
||||
except AttributeError:
|
||||
header = func.__name__
|
||||
header = func.__name__.replace('_', ' ')
|
||||
# Non-field list_display values don't get ordering capability.
|
||||
raw_template.append('<th>%s</th>' % capfirst(header))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user