Project

General

Profile

0001-misc-handle-shared-template-used-for-404-for-hobo-it.patch

Frédéric Péters, 08 Feb 2019 12:14 PM

Download (1.25 KB)

View differences:

Subject: [PATCH] misc: handle shared template (used for 404) for hobo itself
 (#30482)

 hobo/context_processors.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
hobo/context_processors.py
71 71

  
72 72
    def get_template(self):
73 73
        item = self.get_cached_item()
74
        self.theme_skeleton_url = settings.THEME_SKELETON_URL
74
        if 'hobo.environment' in settings.INSTALLED_APPS:
75
            from hobo.multitenant.settings_loaders import TemplateVars
76
            from hobo.deploy.utils import get_hobo_json
77
            context = TemplateVars.get_hobo_json_variables(get_hobo_json())
78
            self.theme_skeleton_url = context['portal_url'] + '__skeleton__/'
79
        else:
80
            self.theme_skeleton_url = settings.THEME_SKELETON_URL
75 81
        if item is None:
76 82
            template_body = self.update_content(in_thread=False)
77 83
            if template_body is None:
78
-