Projet

Général

Profil

0001-misc-serve-a-minimalistic-template-if-no-portal-have.patch

Frédéric Péters, 20 novembre 2020 18:23

Télécharger (1,16 ko)

Voir les différences:

Subject: [PATCH] misc: serve a minimalistic template if no portal have been
 deployed (#48737)

 hobo/context_processors.py | 4 ++++
 1 file changed, 4 insertions(+)
hobo/context_processors.py
75 75
            from hobo.multitenant.settings_loaders import TemplateVars
76 76
            from hobo.deploy.utils import get_hobo_json
77 77
            context = TemplateVars.get_hobo_json_variables(get_hobo_json())
78
            if 'portal_url' not in context:
79
                # serve a minimalistic template if no portal have been
80
                # deployed.
81
                return Template('<html><body>{% block content %}{% endblock %}</body></html>')
78 82
            self.theme_skeleton_url = context['portal_url'] + '__skeleton__/'
79 83
        else:
80 84
            self.theme_skeleton_url = settings.THEME_SKELETON_URL
81
-