summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xforum/models/answer.py1
-rwxr-xr-xforum/models/question.py15
2 files changed, 9 insertions, 7 deletions
diff --git a/forum/models/answer.py b/forum/models/answer.py
index 8910ea39..3de6cfc4 100755
--- a/forum/models/answer.py
+++ b/forum/models/answer.py
@@ -16,6 +16,7 @@ class AnswerManager(models.Manager):
author = author,
added_at = added_at,
wiki = wiki,
+ text = text,
html = sanitize_html(markdowner.convert(text)),
)
if answer.wiki:
diff --git a/forum/models/question.py b/forum/models/question.py
index 7b70f538..683f7a3c 100755
--- a/forum/models/question.py
+++ b/forum/models/question.py
@@ -34,15 +34,16 @@ class QuestionManager(models.Manager):
html = sanitize_html(markdowner.convert(text))
summary = strip_tags(html)[:120]
question = Question(
- title = title,
- author = author,
- added_at = added_at,
+ title = title,
+ author = author,
+ added_at = added_at,
last_activity_at = added_at,
last_activity_by = author,
- wiki = wiki,
- tagnames = tagnames,
- html = html,
- summary = summary
+ wiki = wiki,
+ tagnames = tagnames,
+ html = html,
+ text = text,
+ summary = summary
)
if question.wiki:
question.last_edited_by = question.author