mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
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:
parent
a06498cb39
commit
8cddfefc4c
1 changed files with 3 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue