Ticket #10784: 10784-admin-list_editable-ordering-validation.diff
File 10784-admin-list_editable-ordering-validation.diff, 872 bytes (added by , 15 years ago) |
---|
-
django/contrib/admin/validation.py
91 91 raise ImproperlyConfigured("'%s.list_editable[%d]' refers to a " 92 92 "field, '%s', which isn't editable through the admin." 93 93 % (cls.__name__, idx, field_name)) 94 if not field.unique and (field_name in (cls.ordering or opts.ordering or ())): 95 raise ImproperlyConfigured("'%s.list_editable[%d]' refers to a " 96 "non-unique field, '%s', which controls the ordering of " 97 "items in the admin." 98 % (cls.__name__, idx, field_name)) 94 99 95 100 # search_fields = () 96 101 if hasattr(cls, 'search_fields'):