#2334: Warning raised when list_filter contains a model method name
----------------------------+-----------------------------------------------
 Reporter:  [EMAIL PROTECTED]     |        Owner:  adrian
     Type:  defect          |       Status:  new   
 Priority:  normal          |    Milestone:        
Component:  Core framework  |      Version:        
 Severity:  normal          |   Resolution:        
 Keywords:                  |  
----------------------------+-----------------------------------------------
Comment (by [EMAIL PROTECTED]):

 Grrr, the patch should be
 
 {{{
 Index: core/management.py
 ===================================================================
 --- core/management.py  (revisione 3336)
 +++ core/management.py  (copia locale)
 @@ -946,7 +946,8 @@
                          try:
                              f = opts.get_field(fn)
                          except models.FieldDoesNotExist:
 -                            e.add(opts, '"admin.list_filter" refers to
 %r, which isn\'t a field.' % fn)
 +                            if not callable(getattr(cls, fn, None)):
 +                                e.add(opts, '"admin.list_filter" refers
 to %r, which isn\'t a field.' % fn)
                          if fn not in opts.admin.list_display:
                              e.add(opts, '"admin.list_display_links"
 refers to %r, which is not defined in "admin.list_display".' % fn)
                  # list_filter
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2334>
Django <http://code.djangoproject.org/>
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 django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to