22from django .urls import reverse
33from django .http import (HttpResponse , HttpResponseRedirect ,
44 HttpResponseServerError )
5- from django .shortcuts import render_to_response
6- from django .template import RequestContext
5+ from django .shortcuts import render
76
87from onelogin .saml2 .auth import OneLogin_Saml2_Auth
98from onelogin .saml2 .settings import OneLogin_Saml2_Settings
@@ -78,13 +77,8 @@ def index(request):
7877 if len (request .session ['samlUserdata' ]) > 0 :
7978 attributes = request .session ['samlUserdata' ].items ()
8079
81- context = RequestContext (request , {'errors' : errors ,
82- 'not_auth_warn' : not_auth_warn ,
83- 'success_slo' : success_slo ,
84- 'attributes' : attributes ,
85- 'paint_logout' : paint_logout }).flatten ()
86- return render_to_response ('index.html' ,
87- context = context )
80+ return render (request , 'index.html' , {'errors' : errors , 'not_auth_warn' : not_auth_warn , 'success_slo' : success_slo ,
81+ 'attributes' : attributes , 'paint_logout' : paint_logout })
8882
8983
9084def attrs (request ):
@@ -95,10 +89,9 @@ def attrs(request):
9589 paint_logout = True
9690 if len (request .session ['samlUserdata' ]) > 0 :
9791 attributes = request .session ['samlUserdata' ].items ()
98-
99- return render_to_response ('attrs.html' ,
100- context = RequestContext (request , {'paint_logout' : paint_logout ,
101- 'attributes' : attributes }).flatten ())
92+ return render (request , 'attrs.html' ,
93+ {'paint_logout' : paint_logout ,
94+ 'attributes' : attributes })
10295
10396
10497def metadata (request ):
0 commit comments