Improved field naming

This commit is contained in:
Syrus Akbary 2015-10-09 22:10:09 -07:00
parent 0bc0218032
commit cf3a32b50a

View File

@ -121,7 +121,7 @@ class Field(object):
"""
Displays the module, class and name of the field.
"""
path = '%r.%s' % (self.object_type, self.__class__.__name__)
path = '%s[%s]' % (self.__class__.__name__, str(self.field_type))
name = getattr(self, 'field_name', None)
if name is not None:
return '<%s: %s>' % (path, name)