diff --git a/django/contrib/admin/validation.py b/django/contrib/admin/validation.py
index 159afa4..8af7728 100644
a
|
b
|
def validate(cls, model):
|
77 | 77 | field = opts.get_field_by_name(field_name)[0] |
78 | 78 | except models.FieldDoesNotExist: |
79 | 79 | raise ImproperlyConfigured("'%s.list_editable[%d]' refers to a " |
80 | | "field, '%s', not defined on %s." |
81 | | % (cls.__name__, idx, field_name, model.__name__)) |
| 80 | "field, '%s', not defined on %s.%s." |
| 81 | % (cls.__name__, idx, field_name, model._meta.app_label, model.__name__)) |
82 | 82 | if field_name not in cls.list_display: |
83 | 83 | raise ImproperlyConfigured("'%s.list_editable[%d]' refers to " |
84 | 84 | "'%s' which is not defined in 'list_display'." |
… |
… |
def validate_inline(cls, parent, parent_model):
|
188 | 188 | if fk and fk.name in cls.exclude: |
189 | 189 | raise ImproperlyConfigured("%s cannot exclude the field " |
190 | 190 | "'%s' - this is the foreign key to the parent model " |
191 | | "%s." % (cls.__name__, fk.name, parent_model.__name__)) |
| 191 | "%s.%s." % (cls.__name__, fk.name, parent_model._meta.app_label, parent_model.__name__)) |
192 | 192 | |
193 | 193 | if hasattr(cls, "readonly_fields"): |
194 | 194 | check_readonly_fields(cls, cls.model, cls.model._meta) |
… |
… |
def get_field(cls, model, opts, label, field):
|
350 | 350 | try: |
351 | 351 | return opts.get_field(field) |
352 | 352 | except models.FieldDoesNotExist: |
353 | | raise ImproperlyConfigured("'%s.%s' refers to field '%s' that is missing from model '%s'." |
354 | | % (cls.__name__, label, field, model.__name__)) |
| 353 | raise ImproperlyConfigured("'%s.%s' refers to field '%s' that is missing from model '%s.%s'." |
| 354 | % (cls.__name__, label, field, model._meta.app_label, model.__name__)) |
355 | 355 | |
356 | 356 | def check_formfield(cls, model, opts, label, field): |
357 | 357 | if getattr(cls.form, 'base_fields', None): |
… |
… |
def fetch_attr(cls, model, opts, label, field):
|
376 | 376 | try: |
377 | 377 | return getattr(model, field) |
378 | 378 | except AttributeError: |
379 | | raise ImproperlyConfigured("'%s.%s' refers to '%s' that is neither a field, method or property of model '%s'." |
380 | | % (cls.__name__, label, field, model.__name__)) |
| 379 | raise ImproperlyConfigured("'%s.%s' refers to '%s' that is neither a field, method or property of model '%s.%s'." |
| 380 | % (cls.__name__, label, field, model._meta.app_label, model.__name__)) |
381 | 381 | |
382 | 382 | def check_readonly_fields(cls, model, opts): |
383 | 383 | check_isseq(cls, "readonly_fields", cls.readonly_fields) |