mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-01-23 15:54:12 +03:00
Easier placement of apps within the second level directory
This commit is contained in:
parent
667d4df01d
commit
6453fea417
|
@ -13,7 +13,12 @@ middleware here, or combine a Django application with an application of another
|
|||
framework.
|
||||
|
||||
"""
|
||||
import os
|
||||
import os, sys
|
||||
|
||||
# This allows easy placement of apps within the interior
|
||||
# {{ cookiecutter.project_slug }} directory.
|
||||
app_path = os.path.dirname(os.path.abspath(__file__)).replace('/config', '')
|
||||
sys.path.append(os.path.join(app_path, '{{ cookiecutter.project_slug }}'))
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' -%}
|
||||
|
|
|
@ -20,4 +20,10 @@ if __name__ == '__main__':
|
|||
"forget to activate a virtual environment?"
|
||||
)
|
||||
raise
|
||||
|
||||
# This allows easy placement of apps within the interior
|
||||
# {{ cookiecutter.project_slug }} directory.
|
||||
current_path = os.path.dirname(os.path.abspath(__file__))
|
||||
sys.path.append(os.path.join(current_path, '{{ cookiecutter.project_slug }}'))
|
||||
|
||||
execute_from_command_line(sys.argv)
|
||||
|
|
Loading…
Reference in New Issue
Block a user