From 928cd7a0987b51c315a814389ea61db5ec05f5b1 Mon Sep 17 00:00:00 2001 From: Horilla Date: Wed, 6 Aug 2025 15:56:39 +0530 Subject: [PATCH] [UPDT] HORILLA: Updated settings.py to include v2_style --- horilla/settings.py | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/horilla/settings.py b/horilla/settings.py index 1cb39ef8f..abdc6c794 100755 --- a/horilla/settings.py +++ b/horilla/settings.py @@ -45,6 +45,9 @@ ALLOWED_HOSTS = env("ALLOWED_HOSTS") # Application definition +THEME_APP = "horilla_theme" + + INSTALLED_APPS = [ "django.contrib.admin", "django.contrib.auth", @@ -57,6 +60,7 @@ INSTALLED_APPS = [ "corsheaders", "simple_history", "django_filters", + THEME_APP, "base", "employee", "recruitment", @@ -96,7 +100,7 @@ TEMPLATES = [ "DIRS": [ BASE_DIR / "templates", ], - "APP_DIRS": True, + "APP_DIRS": False, "OPTIONS": { "context_processors": [ "django.template.context_processors.debug", @@ -104,6 +108,14 @@ TEMPLATES = [ "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", ], + "loaders": [ + ( + "django.template.loaders.filesystem.Loader", + [BASE_DIR / THEME_APP / "templates"], + ), + "django.template.loaders.app_directories.Loader", + ("django.template.loaders.filesystem.Loader", [BASE_DIR / "templates"]), + ], }, }, ] @@ -213,7 +225,6 @@ LANGUAGES = ( ("zh-hant", "Traditional Chinese"), ) - LOCALE_PATHS = [ join(BASE_DIR, "horilla", "locale"), ] @@ -232,18 +243,6 @@ USE_L10N = True USE_TZ = True -# Production settings -if not DEBUG: - SECURE_BROWSER_XSS_FILTER = True - SECURE_SSL_REDIRECT = True - SECURE_HSTS_SECONDS = 31536000 - SECURE_HSTS_INCLUDE_SUBDOMAINS = True - SECURE_HSTS_PRELOAD = True - SECURE_CONTENT_TYPE_NOSNIFF = True - SESSION_COOKIE_SECURE = True - CSRF_COOKIE_SECURE = True - SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") - # LDAP Configuration # import ldap