X
X
xxx2017-08-15 16:18:08
Django
xxx, 2017-08-15 16:18:08

Where to change paths in Django project?

Checking two scoops of django now and want to build a project structure like there. Created a project called blog
Inside the blog project, renamed the blog folder to config.

blog
    ├── config
    │   ├── __init__.py
    │   ├── __init__.pyc
    │   ├── settings.py
    │   ├── settings.pyc
    │   ├── urls.py
    │   └── wsgi.py
    ├── manage.py
    └── media

python manage.py runserver
ImportError: No module named blog.settings

Where to change paths?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Shakirov, 2017-08-15
@Heavy10110

In manage.py you need to specify the path to the settings

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question