From a9515dce139b8915a13874e863ecd9243f5c2c35 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Tue, 28 Dec 2021 13:26:56 +0100 Subject: [PATCH] Print current_user info & drop topbar unused elements --- ereuse_devicehub/resources/user/models.py | 6 + ereuse_devicehub/static/img/profile-img.jpg | Bin 4957 -> 0 bytes .../templates/ereuse_devicehub/base_site.html | 148 +----------------- .../ereuse_devicehub/user_profile.html | 12 +- ereuse_devicehub/views.py | 6 +- 5 files changed, 15 insertions(+), 157 deletions(-) delete mode 100644 ereuse_devicehub/static/img/profile-img.jpg diff --git a/ereuse_devicehub/resources/user/models.py b/ereuse_devicehub/resources/user/models.py index c9d3fef7..70f14e00 100644 --- a/ereuse_devicehub/resources/user/models.py +++ b/ereuse_devicehub/resources/user/models.py @@ -71,6 +71,12 @@ class User(UserMixin, Thing): """Alias because flask-login expects `is_active` attribute""" return self.active + @property + def get_full_name(self): + # TODO(@slamora) create first_name & last_name fields and use + # them to generate user full name + return self.email + def check_password(self, password): # take advantage of SQL Alchemy PasswordType to verify password return self.password == password diff --git a/ereuse_devicehub/static/img/profile-img.jpg b/ereuse_devicehub/static/img/profile-img.jpg deleted file mode 100644 index 16ac22904218c0ab01136463638b24715503874e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4957 zcmb7IWmMGP*8UAMbPg~y(hUko2n;dQ&<%=&2nsTUG)OlxbcjewcS=YoDIq0|l%ya- zr}X82?|s*L*Zb|=XMcOvK5L)#JnK1UpWB(+C4fv#SydSTfdBw>w}9I@Kmh<_Vf~YL z0l7MSu?`j~}_}JL^l*EL@l>hIz?F68BfEVBe20;NVCTvPui&5Rq z5ze{+bV$+bjhEI9a;Xr|U148eflvIBA6qbAyw;6$(vHP3A*{V45b_O6_{CAF>F=4A z(N5ZPgDbd9)Vj?B-IgE-8Cdw$MNEp7!*Bb+Rx@)??BTHE03L&<$&VWSwYa~0c=zJe zmlIU6bmt_t$zw2{?m(@USCiTGKlvbKDlR?0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