ajax submit new post

This commit is contained in:
Rocky Duan
2012-08-03 12:29:45 -04:00
parent 0b96d0091b
commit e59ea854ca
5 changed files with 42 additions and 23 deletions

View File

@@ -65,7 +65,9 @@ def create_thread(request, course_id, commentable_id):
'thread': response,
}
html = render_to_string('discussion/ajax_thread_only.html', context)
return HtmlResponse(html)
return JsonResponse({
'html': html,
})
else:
return JsonResponse(response)