Django ImportError: Could not import settings 'mysite.settings.local' (Is it on sys.path?): No module named settings.local
10,434
try touch __init__.py
in your settings
directory
Author by
johnmic07
Updated on June 05, 2022Comments
-
johnmic07 almost 2 years
I'm setting up a site in django with multiple settings files as recommended in 2 scoops of django where settings.py is replaced with a settings directory that contains multiple settings files (local.py, etc.). My development server will run fine when I leave settings.py in the default location, but when I move it into the new settings directory I created and run the development server with:
python manage.py runserver --settings=mysite.settings.local
I get the error:
ImportError: Could not import settings 'mysite.settings.local' (Is it on sys.path?): No module named settings.local
I have added the directory to the python path and it shows up when I go into python and enter:
import sys sys.path
I am running out of ideas. Any help would be great.