#11965: A ModelAdmin method returning bool is not formatted with an image
-------------------------------------------+--------------------------------
          Reporter:  romkyns               |         Owner:  nobody      
            Status:  closed                |     Milestone:              
         Component:  django.contrib.admin  |       Version:  SVN         
        Resolution:  wontfix               |      Keywords:  list_display
             Stage:  Unreviewed            |     Has_patch:  1           
        Needs_docs:  0                     |   Needs_tests:  0           
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Changes (by lukeplant):

  * status:  new => closed
  * resolution:  => wontfix

Comment:

 Given we already have one way of controlling whether this behaviour
 occurs, I think it's inappropriate to automatically do it as well.  The
 analogy to a boolean model field fails because you **have** specified very
 explicitly that the field is boolean by using !BooleanField (or
 something), which is not the same as a method that happens to return a
 boolean value, but it could be anything.

 Secondly, the autodetection fails if you have a method that happens to use
 0 for False and 1 for True, which some (old-ish) Python libraries still
 do, and it also fails if you want 'None' to return the 'unknown' graphic
 (as it does for null boolean model fields).

 These things considered, it's better to just keep a single, explicit
 method that always works.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/11965#comment:3>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to