Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a8aee99

Browse files
author
mtredinnick
committed
Fixed #9507 -- Correct an example in the admin docs. Thanks, john_scott and
SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9432 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 83987fd commit a8aee99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/ref/contrib/admin.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ You have four possible values that can be used in ``list_display``:
262262
example::
263263

264264
def upper_case_name(obj):
265-
return "%s %s" % (obj.first_name, obj.last_name).upper()
265+
return ("%s %s" % (obj.first_name, obj.last_name)).upper()
266266
upper_case_name.short_description = 'Name'
267267

268268
class PersonAdmin(admin.ModelAdmin):
@@ -275,7 +275,7 @@ You have four possible values that can be used in ``list_display``:
275275
list_display = ('upper_case_name',)
276276

277277
def upper_case_name(self, obj):
278-
return "%s %s" % (obj.first_name, obj.last_name).upper()
278+
return ("%s %s" % (obj.first_name, obj.last_name)).upper()
279279
upper_case_name.short_description = 'Name'
280280

281281
* A string representing an attribute on the model. This behaves almost

0 commit comments

Comments
 (0)