From d8e86c6d50d5d50cd11a3aabef5ccc0b6d71cfed Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 22 Aug 2017 00:31:56 +0200 Subject: Django 1.11: use render() instead render_to_response - pass dict to templates --- archaeological_warehouse/wizards.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'archaeological_warehouse/wizards.py') diff --git a/archaeological_warehouse/wizards.py b/archaeological_warehouse/wizards.py index 571e56b1b..6678e6c36 100644 --- a/archaeological_warehouse/wizards.py +++ b/archaeological_warehouse/wizards.py @@ -17,8 +17,7 @@ # See the file COPYING for details. -from django.shortcuts import render_to_response -from django.template import RequestContext +from django.shortcuts import render from ishtar_common.forms import reverse_lazy from ishtar_common.wizards import Wizard, DeletionWizard @@ -50,8 +49,7 @@ class PackagingWizard(TreatmentWizard): extra_args_for_new=extra_args_for_new) packaging = TreatmentType.objects.get(txt_idx='packaging') treatment.treatment_types.add(packaging) - res = render_to_response('ishtar/wizard/wizard_done.html', {}, - context_instance=RequestContext(self.request)) + res = render(self.request, 'ishtar/wizard/wizard_done.html', {}) return return_object and (obj, res) or res @@ -141,9 +139,7 @@ class ContainerWizard(Wizard): self.current_object = container # force evaluation of lazy urls dct['wizard_done_window'] = unicode(self.wizard_done_window) - return render_to_response( - self.wizard_done_template, dct, - context_instance=RequestContext(self.request)) + return render(self.request, self.wizard_done_template, dct) class ContainerModificationWizard(ContainerWizard): -- cgit v1.2.3