Skip to content

Commit

Permalink
Merge pull request #161 from ccnmtl/use-render
Browse files Browse the repository at this point in the history
Use render() instead of render_to_response()
  • Loading branch information
thraxil committed Mar 30, 2017
2 parents bf68e11 + 7482917 commit 1080877
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pagetree/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from django.http import HttpResponse, HttpResponseRedirect
from django.utils.encoding import smart_text
from django.shortcuts import (
get_object_or_404, render_to_response, render)
from django.shortcuts import get_object_or_404, render
from django.template.context import RequestContext
from django.template.defaultfilters import slugify
from django.template.response import TemplateResponse
Expand Down Expand Up @@ -81,8 +80,8 @@ def import_pageblock_json(request, pageblock_id):
block.import_from_dict(json)
return HttpResponseRedirect(block.section.get_edit_url())
else:
return render_to_response("import_json.html", dict(),
context_instance=RequestContext(request))
return render(request, "import_json.html", dict(),
context_instance=RequestContext(request))


def edit_pageblock(request, pageblock_id, success_url=None):
Expand Down

0 comments on commit 1080877

Please sign in to comment.