Modified files
app/models.py
---
+++
@@ -21,6 +21,14 @@
USERNAME_FIELD = "email"
REQUIRED_FIELDS = []
+
+ @property
+ def article_count(self):
+ return self.articles.count()
+
+ @property
+ def written_words(self):
+ return self.articles.aggregate(models.Sum("word_count"))["word_count__sum"] or 0
class Article(models.Model):