diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-11-17 15:26:50 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-11-17 15:26:50 +0000 |
| commit | 33ffa72e40390255df361bfb5f1cee40dc3de508 (patch) | |
| tree | ec51c7760b96756fe2161f88f32ccfa43421be77 /django | |
| parent | 56e40c5884e17f037ddbe7091d42fe6f8e602814 (diff) | |
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
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/admin/views/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py index 849a774e0a..fd2849ba5e 100644 --- a/django/contrib/admin/views/main.py +++ b/django/contrib/admin/views/main.py @@ -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: |
