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 /docs | |
parent | 56e40c5884e17f037ddbe7091d42fe6f8e602814 (diff) | |
download | django-33ffa72e40390255df361bfb5f1cee40dc3de508.tar.gz |
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 'docs')
-rw-r--r-- | docs/tutorial02.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/tutorial02.txt b/docs/tutorial02.txt index 5dc326b1d4..97d9be53b7 100644 --- a/docs/tutorial02.txt +++ b/docs/tutorial02.txt @@ -331,12 +331,13 @@ Now the poll change list page looks like this: You can click on the column headers to sort by those values -- except in the case of the ``was_published_today`` header, because sorting by the output of an arbitrary method is not supported. Also note that the column header for -``was_published_today`` is, by default, the name of the method. But you can -change that by giving that method a ``short_description`` attribute:: +``was_published_today`` is, by default, the name of the method (with +underscores replaced with spaces). But you can change that by giving that +method a ``short_description`` attribute:: def was_published_today(self): return self.pub_date.date() == datetime.date.today() - was_published_today.short_description = 'Was published today' + was_published_today.short_description = 'Published today?' Let's add another improvement to the Poll change list page: Filters. Add the |