Commit 48a13779 by Bridger Maxwell

Fixed render_to_string parameter (context was being passed in without using…

Fixed render_to_string parameter (context was being passed in without using 'context_instance' kwarg)
parent 7b6078b8
...@@ -98,14 +98,14 @@ def get_article(func=None, can_read=True, can_write=False, deleted_contents=Fals ...@@ -98,14 +98,14 @@ def get_article(func=None, can_read=True, can_write=False, deleted_contents=Fals
return redirect(django_settings.LOGIN_URL) return redirect(django_settings.LOGIN_URL)
else: else:
c = RequestContext(request, {'urlpath' : urlpath}) c = RequestContext(request, {'urlpath' : urlpath})
return HttpResponseForbidden(render_to_string("wiki/permission_denied.html", c)) return HttpResponseForbidden(render_to_string("wiki/permission_denied.html", context_instance=c))
if can_write and not article.can_write(request.user): if can_write and not article.can_write(request.user):
if request.user.is_anonymous(): if request.user.is_anonymous():
return redirect(django_settings.LOGIN_URL) return redirect(django_settings.LOGIN_URL)
else: else:
c = RequestContext(request, {'urlpath' : urlpath}) c = RequestContext(request, {'urlpath' : urlpath})
return HttpResponseForbidden(render_to_string("wiki/permission_denied.html", c)) return HttpResponseForbidden(render_to_string("wiki/permission_denied.html", context_instance=c))
# If the article has been deleted, show a special page. # If the article has been deleted, show a special page.
if not deleted_contents and article.current_revision and article.current_revision.deleted: if not deleted_contents and article.current_revision and article.current_revision.deleted:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment