From a4ba880252b2bad72df3f16dd11fdf2206825335 Mon Sep 17 00:00:00 2001 From: Justin Choquette Date: Mon, 23 Oct 2023 16:24:13 -0400 Subject: Single Template Selection For Compatible Dashboards Change-Id: I0a795c2c49fdbe0427182a8789d622003997efcd Signed-off-by: Justin Choquette --- src/laas_dashboard/settings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/laas_dashboard') diff --git a/src/laas_dashboard/settings.py b/src/laas_dashboard/settings.py index a56265e..22f33ef 100644 --- a/src/laas_dashboard/settings.py +++ b/src/laas_dashboard/settings.py @@ -87,15 +87,15 @@ if os.environ.get('EXPECT_HOST_FORWARDING') == 'True': ROOT_URLCONF = 'laas_dashboard.urls' -TEMPLATE_OVERRIDE = os.environ.get("TEMPLATE_OVERRIDE_DIR", "") # the user's custom template dir +PROJECT = os.environ.get("PROJECT", "") # the project for the current deployment (i.e. anuket or lfedge) TEMPLATE_DIRS = ["base"] # where all the base templates are # If the user has a custom template directory, # We should search that first. Then we search the # root template directory so that we can extend the base # templates within the custom template dir. -if TEMPLATE_OVERRIDE: - TEMPLATE_DIRS = [TEMPLATE_OVERRIDE, ""] + TEMPLATE_DIRS +if PROJECT: + TEMPLATE_DIRS = [PROJECT, ""] + TEMPLATE_DIRS # all template dirs are relative to /project_root/templates/ dirs = [os.path.join(BASE_DIR, "templates", d) for d in TEMPLATE_DIRS] -- cgit 1.2.3-korg