I want to prepare the server for deployment and this is the setup. settings.py is split into dev.py and prod.py
in settings.py at the bottom ALLOWED_HOSTS = []
I also have tried ALLOWED_HOSTS = ['*']
dev.py
JavaScript
x
5
1
from ..settings.settings import *
2
DEBUG = True
3
4
5
wsgy.py
JavaScript
1
4
1
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'movie_api.settings.dev')
2
3
CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False.
4
When I import settings in the manage.py shell, the settings.DEBUG = False
.. why?
How to make wsgi.py
read the correct file?
Advertisement
Answer
I solved the problem by changing the settings path in manage.py