Add __repr__ to mapped classes

This makes string representations of lists, tuples, dicts, etc. with the
DB objects make sense
This commit is contained in:
Petr Viktorin 2011-04-03 21:00:58 +03:00
parent a06498cb39
commit 8cddfefc4c

View file

@ -62,6 +62,9 @@ class TableSuperclass(object):
def __str__(self):
return unicode(self).encode('utf8')
def __repr__(self):
return unicode(self).encode('utf8')
mapped_classes = []
class TableMetaclass(DeclarativeMeta):
def __init__(cls, name, bases, attrs):