Fixes wsgi.py app_path to avoid deleting all /config occurrences. (#1467)

This commit is contained in:
David 2018-02-02 22:01:28 +01:00 committed by Nikita Shupeyko
parent 4b7a70d875
commit b24d0d0bd8

View File

@ -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' -%}