0
0
mirror of https://github.com/django/django.git synced 2024-11-29 22:56:46 +01:00

Fixed failing tests from [8352]. Thanks Alex Gaynor for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8354 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Brian Rosner 2008-08-14 21:03:44 +00:00
parent dd0e5fd992
commit 2102967807
2 changed files with 3 additions and 2 deletions

View File

@ -39,7 +39,7 @@ def validate(cls, model):
if not hasattr(cls, field):
if not hasattr(model, field):
try:
return opts.get_field(field)
opts.get_field(field)
except models.FieldDoesNotExist:
raise ImproperlyConfigured("%s.list_display[%d], %r is "
"not a callable or an attribute of %r or found in the model %r."

View File

@ -559,7 +559,8 @@ ImproperlyConfigured: `ValidationTestModelAdmin.list_display` must be a list or
>>> validate(ValidationTestModelAdmin, ValidationTestModel)
Traceback (most recent call last):
...
ImproperlyConfigured: `ValidationTestModelAdmin.list_display[0]` refers to `non_existent_field` that is neither a field, method or property of model `ValidationTestModel`.
ImproperlyConfigured: ValidationTestModelAdmin.list_display[0], 'non_existent_field' is not a callable or an attribute of 'ValidationTestModelAdmin' or found in the model 'ValidationTestModel'.
>>> class ValidationTestModelAdmin(ModelAdmin):
... list_display = ('users',)