From 1068dacadebd1b9fdde2512be2cede7ee3bde3f9 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Wed, 29 Jan 2020 01:02:37 -0800 Subject: [PATCH] Add str and repr to user model --- amanuensis/user.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/amanuensis/user.py b/amanuensis/user.py index 4244996..0dc5476 100644 --- a/amanuensis/user.py +++ b/amanuensis/user.py @@ -49,6 +49,12 @@ class UserModel(UserMixin): raise AttributeError(key) return self.config.get(key) + def __str__(self): + return ''.format(self.username) + + def __repr__(self): + return ''.format(self) + def set_password(self, pw): h = generate_password_hash(pw) with json_rw(self.config_path) as j: