diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-08-22 00:31:56 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-08-22 00:31:56 +0200 |
commit | d8e86c6d50d5d50cd11a3aabef5ccc0b6d71cfed (patch) | |
tree | 50ed3dbd56724470f898bb58a14264051377277b /archaeological_files | |
parent | 9314f621ef3989ebe6aa01c44fd501299fef8d53 (diff) | |
download | Ishtar-d8e86c6d50d5d50cd11a3aabef5ccc0b6d71cfed.tar.bz2 Ishtar-d8e86c6d50d5d50cd11a3aabef5ccc0b6d71cfed.zip |
Django 1.11: use render() instead render_to_response - pass dict to templates
Diffstat (limited to 'archaeological_files')
-rw-r--r-- | archaeological_files/views.py | 5 | ||||
-rw-r--r-- | archaeological_files/wizards.py | 7 |
2 files changed, 4 insertions, 8 deletions
diff --git a/archaeological_files/views.py b/archaeological_files/views.py index d21e5801c..0c0dac3f3 100644 --- a/archaeological_files/views.py +++ b/archaeological_files/views.py @@ -23,7 +23,7 @@ import re from django.core.urlresolvers import reverse from django.db.models import Q from django.http import HttpResponse -from django.shortcuts import render_to_response, redirect +from django.shortcuts import redirect, render from django.utils.translation import ugettext_lazy as _ from ishtar_common.views import get_item, show_item, revert_item @@ -99,8 +99,7 @@ def dashboard_file(request, *args, **kwargs): Main dashboard """ dct = {'dashboard': models.FileDashboard()} - return render_to_response('ishtar/dashboards/dashboard_file.html', dct, - context_instance=RequestContext(request)) + return render(request, 'ishtar/dashboards/dashboard_file.html', dct) file_search_wizard = SearchWizard.as_view( [('general-file_search', FileFormSelection)], diff --git a/archaeological_files/wizards.py b/archaeological_files/wizards.py index 1558cd46e..e8d6ca9ae 100644 --- a/archaeological_files/wizards.py +++ b/archaeological_files/wizards.py @@ -20,8 +20,7 @@ from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db.models import Max -from django.shortcuts import render_to_response -from django.template import RequestContext +from django.shortcuts import render from django.utils.translation import ugettext_lazy as _ from ishtar_common.forms import reverse_lazy @@ -134,9 +133,7 @@ class FileDeletionWizard(FileClosingWizard): for operation in Operation.objects.filter(associated_file=obj).all(): operation.delete() obj.delete() - return render_to_response( - 'ishtar/wizard/wizard_delete_done.html', {}, - context_instance=RequestContext(self.request)) + return render(self.request, 'ishtar/wizard/wizard_delete_done.html', {}) class FileAdministrativeActWizard(OperationAdministrativeActWizard): |