Use request URL instead of view name in forbidden view referrer
authorThierry Florac <thierry.florac@onf.fr>
Thu, 02 Jun 2016 16:15:58 +0200
changeset 62 9f4dec677e75
parent 61 7c955f81dccf
child 63 402858ec5ac9
Use request URL instead of view name in forbidden view referrer
src/pyams_security/views/login.py
--- a/src/pyams_security/views/login.py	Thu Jun 02 16:14:07 2016 +0200
+++ b/src/pyams_security/views/login.py	Thu Jun 02 16:15:58 2016 +0200
@@ -54,7 +54,7 @@
 @forbidden_view_config(request_type=IPyAMSLayer)
 def ForbiddenView(request):
     """Default forbidden view"""
-    request.session[LOGIN_REFERER_KEY] = request.view_name
+    request.session[LOGIN_REFERER_KEY] = request.url
     return HTTPFound('login.html')