Update request context when using "+" route
authorThierry Florac <tflorac@ulthar.net>
Wed, 30 Jan 2019 18:27:13 +0100
changeset 411 182295d018f7
parent 410 61788d2c539f
child 412 9fdfc9392edc
Update request context when using "+" route
src/pyams_default_theme/routes.py
--- a/src/pyams_default_theme/routes.py	Tue Jan 29 16:52:23 2019 +0100
+++ b/src/pyams_default_theme/routes.py	Wed Jan 30 18:27:13 2019 +0100
@@ -57,6 +57,7 @@
             if location == request.url:
                 # return view response to avoid infinite redirection!
                 request.annotations[DISPLAY_CONTEXT] = request.context
+                request.context = target
                 response = render_view_to_response(target, request, view_name)
             else:
                 response = Response()