From 791de952f48b5ff2c22483b4327b00cc02cf5412 Mon Sep 17 00:00:00 2001 From: Xiretza Date: Sun, 8 May 2022 18:15:21 +0200 Subject: [PATCH] fix: move template directory into source directory This is in preparation for creating a python package. --- etebase_server/settings.py | 5 +++-- {templates => etebase_server/templates}/success.html | 0 2 files changed, 3 insertions(+), 2 deletions(-) rename {templates => etebase_server/templates}/success.html (100%) diff --git a/etebase_server/settings.py b/etebase_server/settings.py index 5ef89e3..185a199 100644 --- a/etebase_server/settings.py +++ b/etebase_server/settings.py @@ -15,7 +15,8 @@ import configparser from .utils import get_secret_from_file # Build paths inside the project like this: os.path.join(BASE_DIR, ...) -BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +SOURCE_DIR = os.path.dirname(os.path.abspath(__file__)) +BASE_DIR = os.path.dirname(SOURCE_DIR) AUTH_USER_MODEL = "myauth.User" @@ -74,7 +75,7 @@ ROOT_URLCONF = "etebase_server.urls" TEMPLATES = [ { "BACKEND": "django.template.backends.django.DjangoTemplates", - "DIRS": [os.path.join(BASE_DIR, "templates")], + "DIRS": [os.path.join(SOURCE_DIR, "templates")], "APP_DIRS": True, "OPTIONS": { "context_processors": [ diff --git a/templates/success.html b/etebase_server/templates/success.html similarity index 100% rename from templates/success.html rename to etebase_server/templates/success.html