Fixes wsgi.py app_path to avoid deleting all /config occurrences.

This commit is contained in:
David Díaz 2018-01-26 12:20:28 +01:00
parent 2d041b6c4d
commit 1a5a3a4c76

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