Use User.get_username() for article cache instead of User.__str__
1 files changed, 2 insertions(+), 2 deletions(-) M src/wiki/models/article.py
M src/wiki/models/article.py => src/wiki/models/article.py +2 -2
@@ 207,9 207,9 @@ class Article(models.Model): def get_cache_content_key(self, user=None): """Returns per-article-user cache key.""" return "{key}:{user!s}".format( return "{key}:{user}".format( key=self.get_cache_key(), user=user if user else "") user=user.get_username() if user else "") def get_cached_content(self, user=None): """Returns cached version of rendered article.