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_files/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'archaeological_files/views.py') 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)], -- cgit v1.2.3