From b24d0d0bd889a50ab042c140b77d22538279355f Mon Sep 17 00:00:00 2001 From: David Date: Fri, 2 Feb 2018 22:01:28 +0100 Subject: [PATCH] Fixes wsgi.py app_path to avoid deleting all /config occurrences. (#1467) --- {{cookiecutter.project_slug}}/config/wsgi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/config/wsgi.py b/{{cookiecutter.project_slug}}/config/wsgi.py index 601d27c6..5f49644c 100644 --- a/{{cookiecutter.project_slug}}/config/wsgi.py +++ b/{{cookiecutter.project_slug}}/config/wsgi.py @@ -20,7 +20,8 @@ from django.core.wsgi import get_wsgi_application # This allows easy placement of apps within the interior # {{ cookiecutter.project_slug }} directory. -app_path = os.path.dirname(os.path.abspath(__file__)).replace('/config', '') +app_path = os.path.abspath(os.path.join( + os.path.dirname(os.path.abspath(__file__)), os.pardir)) sys.path.append(os.path.join(app_path, '{{ cookiecutter.project_slug }}')) {% if cookiecutter.use_sentry_for_error_reporting == 'y' -%}