Projet

Général

Profil

0002-misc-ugly-hack-for-user_urls-on-w.c.s.-61192.patch

Benjamin Dauvergne, 28 janvier 2022 12:58

Télécharger (1,03 ko)

Voir les différences:

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(-)
hobo/context_processors.py
191 191

  
192 192

  
193 193
def user_urls(request):
194
    template_vars = getattr(settings, 'TEMPLATE_VARS', {})
194
    # ugly, but necessary..
195
    if 'wcs.qommon' in settings.INSTALLED_APPS:
196
        from quixote import get_publisher
197

  
198
        pub = get_publisher()
199
        template_vars = (pub and pub.get_substitution_variables()) or {}
200
    else:
201
        template_vars = getattr(settings, 'TEMPLATE_VARS', {})
195 202
    full_path = request.get_full_path()
196 203
    query_string = urlencode({'next': full_path})
197 204
    context = {
198
-