From bfdc219f139bf9645f29b95bf4cc7824138f87b7 Mon Sep 17 00:00:00 2001 From: Kyle McFarland Date: Wed, 17 Oct 2018 22:37:42 -0600 Subject: settings.py: Use BASE_DIR in template directories Previously environments where the cwd wasn't the project root would except looking for base.html using a relative path, this fixes that to use an absolute path instead. (fixes running with apache + mod_wsgi) --- coding_assignment_project/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coding_assignment_project/settings.py b/coding_assignment_project/settings.py index 9afeb50..3d44c83 100644 --- a/coding_assignment_project/settings.py +++ b/coding_assignment_project/settings.py @@ -56,7 +56,7 @@ ROOT_URLCONF = 'coding_assignment_project.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': ['coding_assignment_project/templates'], + 'DIRS': [os.path.join(BASE_DIR, 'coding_assignment_project', 'templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ -- cgit v1.1