﻿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
10635	list_editable: mention Meta class in ordering exception	mkbucc@…	Jacob	"{{{
>>> l = (opts.ordering or cls.ordering)
>>> l
[ '-id' ]
>>> not l
False
>>>
}}}

Following patch fixes this bug.

{{{
        To apply:
                $ cd <django-src-root>
                $ patch -p0 < contrib.admin.validate.patch0

        For example, 
                $ cd /usr/lib/python2.5/site-packages/django/
                $ sudo patch -p0 < $OLDPWD/contrib.admin.validate.patch0
                $ cd -


--- /dev/null
+++ ./contrib/admin/validation.py       2009-03-26 10:37:36.000000000 -0400
@@ -67,7 +67,7 @@
     # list_editable
     if hasattr(cls, 'list_editable') and cls.list_editable:
         check_isseq(cls, 'list_editable', cls.list_editable)
-        if not (opts.ordering or cls.ordering):
+        if not len(opts.ordering or cls.ordering):
             raise ImproperlyConfigured(""'%s.list_editable' cannot be used ""
                 ""without a default ordering. Please define ordering on either %s or %s.""
                 % (cls.__name__, cls.__name__, model.__name__))
}}}"		closed	Documentation	1.1-beta		fixed			Accepted	0	0	0	0	0	0
