22from django .core .urlresolvers 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
@@ -97,13 +96,8 @@ def index(request):
9796 if len (request .session ['samlUserdata' ]) > 0 :
9897 attributes = request .session ['samlUserdata' ].items ()
9998
100- return render_to_response ('index.html' ,
101- {'errors' : errors ,
102- 'not_auth_warn' : not_auth_warn ,
103- 'success_slo' : success_slo ,
104- 'attributes' : attributes ,
105- 'paint_logout' : paint_logout },
106- context_instance = RequestContext (request ))
99+ return render (request , 'index.html' , {'errors' : errors , 'not_auth_warn' : not_auth_warn , 'success_slo' : success_slo ,
100+ 'attributes' : attributes , 'paint_logout' : paint_logout })
107101
108102
109103def attrs (request ):
@@ -115,10 +109,9 @@ def attrs(request):
115109 if len (request .session ['samlUserdata' ]) > 0 :
116110 attributes = request .session ['samlUserdata' ].items ()
117111
118- return render_to_response ('attrs.html' ,
119- {'paint_logout' : paint_logout ,
120- 'attributes' : attributes },
121- context_instance = RequestContext (request ))
112+ return render (request , 'attrs.html' ,
113+ {'paint_logout' : paint_logout ,
114+ 'attributes' : attributes })
122115
123116
124117def metadata (request ):
0 commit comments