diff --git a/apps/questions/models.py b/apps/questions/models.py index 9d0e36732e2..1a6222966d7 100755 --- a/apps/questions/models.py +++ b/apps/questions/models.py @@ -220,6 +220,10 @@ def is_contributor(self, user): return False + @property + def is_solved(self): + return Answer.objects.filter(pk=self.solution_id).exists() + class QuestionMetaData(ModelBase): """Metadata associated with a support question.""" diff --git a/apps/questions/templates/questions/new_question.html b/apps/questions/templates/questions/new_question.html index da81d7ca99e..934d2a1c913 100644 --- a/apps/questions/templates/questions/new_question.html +++ b/apps/questions/templates/questions/new_question.html @@ -45,7 +45,59 @@
+ {{ result.object.current_revision.summary }} +
+ {% elif result.type == 'question' %} ++ {{ result.object.content|truncate(500) }} +
+