Added app_label to the error message when field reconstructing fails.

This commit is contained in:
Baptiste Mispelon 2013-12-06 14:59:08 +01:00
parent a06fd092ef
commit f463789f62
1 changed files with 2 additions and 1 deletions

View File

@ -102,8 +102,9 @@ class ModelState(object):
try: try:
fields.append((name, field_class(*args, **kwargs))) fields.append((name, field_class(*args, **kwargs)))
except TypeError as e: except TypeError as e:
raise TypeError("Couldn't reconstruct field %s on %s: %s" % ( raise TypeError("Couldn't reconstruct field %s on %s.%s: %s" % (
name, name,
model._meta.app_label,
model._meta.object_name, model._meta.object_name,
e, e,
)) ))