Commits

John Groszko  committed d200584

Pass our comment template a RequestContext too

  • Participants
  • Parent commits ea00bda

Comments (0)

Files changed (1)

File ajaxcomments/utils.py

 from django.utils import simplejson
 from django import http
 from django.template.loader import render_to_string
+from django.template import RequestContext
 from django.contrib.comments.views import comments
 from django.contrib.comments.models import Comment
 from django.shortcuts import render_to_response
                 'success': success,
                 'errors': json_errors,
                 'html': render_to_string('comments/comment.html',
-                                         {'comment': Comment.objects.get(id=kwargs['c']) }),
+                                         {'comment': Comment.objects.get(id=kwargs['c']) },
+                                         context_instance=RequestContext(request)),
             })
     
             return http.HttpResponse(json_response, mimetype="application/json")