Updated relative_url TALES extension to add display_context argument
authorThierry Florac <tflorac@ulthar.net>
Tue, 24 Nov 2020 18:29:43 +0100
changeset 448 668147e09022
parent 447 fa1444ee44ed
child 449 c1c9032f8477
Updated relative_url TALES extension to add display_context argument
src/pyams_utils/url.py
--- a/src/pyams_utils/url.py	Fri Nov 13 16:30:14 2020 +0100
+++ b/src/pyams_utils/url.py	Tue Nov 24 18:29:43 2020 +0100
@@ -222,10 +222,11 @@
     context.
     """
 
-    def render(self, context=None, view_name=None, query=None):
+    def render(self, context=None, view_name=None, query=None, display_context=None):
         """Rander TALES extension;
         see :py:class:`ITALESExtension <pyams_utils.interfaces.tales.ITALESExtension>`
         """
         if context is None:
             context = self.context
-        return relative_url(context, self.request, view_name=view_name, query=query)
+        return relative_url(context, self.request, display_context,
+                            view_name=view_name, query=query)