I am new to django-1.6. When I run the django server with DEBUG = True
, it's running perfectly. But when I change DEBUG
to False
in the settings file, then the server stopped and it gives the following error on the command prompt:
CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False.
After I changed ALLOWED_HOSTS
to ["http://127.0.0.1:8000",]
, in the browser I get the error:
Bad Request (400)
Is it possible to run Django without debug mode?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…