1
0
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:
Adrian Holovaty
2005-11-17 15:26:50 +00:00
parent 56e40c5884
commit 33ffa72e40
2 changed files with 5 additions and 4 deletions

View File

@@ -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: