From 6b5d46317a1af7bef8056f17bed1bae1910531f7 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 28 Jan 2022 12:57:54 +0100 Subject: [PATCH 2/2] misc: ugly hack for user_urls on w.c.s. (#61192) --- hobo/context_processors.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hobo/context_processors.py b/hobo/context_processors.py index b263421..a375f74 100644 --- a/hobo/context_processors.py +++ b/hobo/context_processors.py @@ -191,7 +191,14 @@ def hobo_json(request): def user_urls(request): - template_vars = getattr(settings, 'TEMPLATE_VARS', {}) + # ugly, but necessary.. + if 'wcs.qommon' in settings.INSTALLED_APPS: + from quixote import get_publisher + + pub = get_publisher() + template_vars = (pub and pub.get_substitution_variables()) or {} + else: + template_vars = getattr(settings, 'TEMPLATE_VARS', {}) full_path = request.get_full_path() query_string = urlencode({'next': full_path}) context = { -- 2.34.1