I'm using Django 1.6.5 with the setting:
DEBUG = True
When I change to DEBUG = False
and run manage.py runserver
, I get the following error:
CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False
I get the same error with the following setting:
ALLOWED_HOSTS = ['127.0.0.1', 'localhost']
How can I fix this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…