﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
2334	Warning raised when list_filter contains a model method name	ludo@…	Adrian Holovaty	"The Admin {{{list_display}}} property for one of my models contains a method name together with a few field names. Everything works ok, but the {{{manage.py}}} script displays the following warning:

{{{
Validating models...
journals.article: ""admin.list_filter"" refers to 'get_short_title', which isn't a field.
1 error found.
}}}

A simple patch to management.py makes the warning go away, but I have no idea about possible side-effects:

{{{
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)):
+                                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
}}}"	defect	closed	Core (Other)		normal	invalid			Unreviewed	0	0	0	0	0	0
