summaryrefslogtreecommitdiffstats
path: root/askbot/views/readers.py
diff options
context:
space:
mode:
Diffstat (limited to 'askbot/views/readers.py')
-rw-r--r--askbot/views/readers.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/askbot/views/readers.py b/askbot/views/readers.py
index ab4ab87b..8e4dff95 100644
--- a/askbot/views/readers.py
+++ b/askbot/views/readers.py
@@ -634,3 +634,11 @@ def get_comment(request):
comment = models.Comment.objects.get(id = id)
request.user.assert_can_edit_comment(comment)
return {'text': comment.comment}
+
+@ajax_only
+@get_only
+def get_question_body(request):
+ from jinja2 import escape
+ id = int(request.GET['id'])
+ question = models.Question.objects.get(id = id)
+ return {'text': escape(question.summary)}