misc: handle shared template (used for 404) for hobo itself (#30482)

This commit is contained in:
Frédéric Péters 2019-02-08 12:14:14 +01:00
parent 050dd5dbd6
commit a56d928d9b
1 changed files with 7 additions and 1 deletions

View File

@ -71,7 +71,13 @@ class RemoteTemplate(object):
def get_template(self):
item = self.get_cached_item()
self.theme_skeleton_url = settings.THEME_SKELETON_URL
if 'hobo.environment' in settings.INSTALLED_APPS:
from hobo.multitenant.settings_loaders import TemplateVars
from hobo.deploy.utils import get_hobo_json
context = TemplateVars.get_hobo_json_variables(get_hobo_json())
self.theme_skeleton_url = context['portal_url'] + '__skeleton__/'
else:
self.theme_skeleton_url = settings.THEME_SKELETON_URL
if item is None:
template_body = self.update_content(in_thread=False)
if template_body is None: