Ticket #9507: r9333-admin-doc.diff
File r9333-admin-doc.diff, 937 bytes (added by , 16 years ago) |
---|
-
docs/ref/contrib/admin.txt
262 262 example:: 263 263 264 264 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) 266 266 upper_case_name.short_description = 'Name' 267 267 268 268 class PersonAdmin(admin.ModelAdmin): … … 275 275 list_display = ('upper_case_name',) 276 276 277 277 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) 279 279 upper_case_name.short_description = 'Name' 280 280 281 281 * A string representing an attribute on the model. This behaves almost