From 9acbefc105e4b3115a76d15390f879ee213e5da7 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Sun, 29 Sep 2019 19:01:18 +0100 Subject: [PATCH] Adjust user model. --- depicts/model.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/depicts/model.py b/depicts/model.py index 9e87508..d3fdbca 100644 --- a/depicts/model.py +++ b/depicts/model.py @@ -58,6 +58,9 @@ class Edit(Base): depicts = relationship('DepictsItem') @property - def user_page_url(self): - start = 'https://www.wikidata.org/wiki/User:' - return start + quote(self.username.replace(' ', '_')) + def url_norm_username(self): + return quote(self.username.replace(' ', '_')) + + @property + def user_wikidata_url(self): + return 'https://www.wikidata.org/wiki/User:' + self.url_norm_username