#11965: A ModelAdmin method returning bool is not formatted with an image
----------------------------------+-----------------------------------------
Reporter: romkyns | Owner: nobody
Status: new | Milestone:
Component: django.contrib.admin | Version: SVN
Keywords: list_display | Stage: Unreviewed
Has_patch: 1 |
----------------------------------+-----------------------------------------
Consider the following model admin:
{{{
class AppleAdmin(admin.ModelAdmin):
list_display = ('has_something',)
def has_something(self, apple):
return apple.something != None
}}}
The "has_something" method returns a bool. When viewing this model through
the list of "apples" in the admin, the "has_something" column will
currently simply say "True/False", whereas a boolean that's actually part
of the "apple" model will be formatted with a special graphic.
Trivial patch attached.
--
Ticket URL: <http://code.djangoproject.com/ticket/11965>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---