middleware: Change render_to_response to render.

Related to #4093
This commit is contained in:
Umair Khan
2017-03-16 18:08:42 +05:00
committed by Tim Abbott
parent da012ee51b
commit 97639e5e48

View File

@@ -22,7 +22,7 @@ from django.views.csrf import csrf_failure as html_csrf_failure
from django.utils.cache import patch_vary_headers from django.utils.cache import patch_vary_headers
from django.utils.http import cookie_date from django.utils.http import cookie_date
from zproject.jinja2 import render_to_response from zproject.jinja2 import render_to_response
from django.shortcuts import redirect from django.shortcuts import redirect, render
import logging import logging
import time import time
@@ -371,7 +371,7 @@ class SessionHostDomainMiddleware(SessionMiddleware):
if subdomain != "": if subdomain != "":
realm = get_realm(subdomain) realm = get_realm(subdomain)
if (realm is None): if (realm is None):
return render_to_response("zerver/invalid_realm.html") return render(render, "zerver/invalid_realm.html")
""" """
If request.session was modified, or if the configuration is to save the If request.session was modified, or if the configuration is to save the
session every time, save the changes and set a session cookie. session every time, save the changes and set a session cookie.