Commit c20b4fdb authored by Jérome Perrin's avatar Jérome Perrin

fixup! web_renderjs_ui: py3

parent 8d2d4c7f
import json import json
import re import re
from six.moves.urllib.parse import urljoin
from Products.ERP5Type.Utils import bytes2str, str2bytes from Products.ERP5Type.Utils import bytes2str, str2bytes
if REQUEST is None: if REQUEST is None:
...@@ -41,6 +40,12 @@ if selected_language == default_language: ...@@ -41,6 +40,12 @@ if selected_language == default_language:
else: else:
base_prefix = '../' base_prefix = '../'
def urljoin(base, url):
# concemtually similar to urllib.parse.urljoin, but without trying to eliminate
# .. path elements, because we want to produce relative URLs that may be parent
# of the base.
return base_prefix + url
mapping_dict = { mapping_dict = {
"base_prefix": base_prefix, "base_prefix": base_prefix,
"frontpage_gadget": web_section.getLayoutProperty("configuration_frontpage_gadget_url", default="worklist"), "frontpage_gadget": web_section.getLayoutProperty("configuration_frontpage_gadget_url", default="worklist"),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment