From 09ba42aa7c64860d2c4963b283b8e75fbf9f76e8 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Thu, 11 Aug 2016 09:21:00 +0530 Subject: [PATCH] Replace render_to_response() with render() In Django 1.10, render_to_response no longer has context_instance argument. It's use is not recommended anyway. Replace it with render() method. --- plinth/modules/first_boot/views.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plinth/modules/first_boot/views.py b/plinth/modules/first_boot/views.py index 628b925b6..937a03d42 100644 --- a/plinth/modules/first_boot/views.py +++ b/plinth/modules/first_boot/views.py @@ -19,8 +19,7 @@ from django.contrib import messages from django.contrib.auth.models import User from django.core.urlresolvers import reverse_lazy from django.http.response import HttpResponseRedirect -from django.shortcuts import render_to_response -from django.template import RequestContext +from django.shortcuts import render from django.utils.translation import ugettext as _ from django.views.generic import CreateView, FormView, TemplateView @@ -67,10 +66,9 @@ def state10(request): connections = network.get_connection_list() - return render_to_response('firstboot_state10.html', - {'title': _('Setup Complete'), - 'connections': connections}, - context_instance=RequestContext(request)) + return render(request, 'firstboot_state10.html', + {'title': _('Setup Complete'), + 'connections': connections}) class State5View(FormView):