str/repr changes
This commit is contained in:
parent
e9142a7f56
commit
027933b645
|
@ -46,6 +46,12 @@ class LexiconModel():
|
|||
raise AttributeError(key)
|
||||
return self.config.get(key)
|
||||
|
||||
def __str__(self):
|
||||
return '<Lexicon {0.name}>'.format(self)
|
||||
|
||||
def __repr__(self):
|
||||
return '<LexiconModel lid={0.id} name={0.name}>'.format(self)
|
||||
|
||||
def log(self, message):
|
||||
now = int(time.time())
|
||||
with json_rw(self.config_path) as j:
|
||||
|
|
|
@ -50,7 +50,7 @@ class UserModel(UserMixin):
|
|||
return self.config.get(key)
|
||||
|
||||
def __str__(self):
|
||||
return '<UserModel {}>'.format(self.username)
|
||||
return '<{0.username}>'.format(self)
|
||||
|
||||
def __repr__(self):
|
||||
return '<UserModel uid={0.id} username={0.username}>'.format(self)
|
||||
|
|
Loading…
Reference in New Issue