Saturday, January 27, 2018

Re: CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False.

If you are not running with the following statement in settings.py:

DEBUG = True

AND you have to run the server with "python manage.py runserver", if you are running it in any other way, you have to setup ALLOWED_HOSTS.

You could also (but definitely not recommended) set ALLOWED_HOSTS = ['*']

That would remove the checks for hosts in a production environment.

Regards,

Andréas

2018-01-27 15:04 GMT+01:00 bootcamprag <collinsd73@gmail.com>:
Hello 

I am using django 2.0 and I cannot resolve the the error in the subject line when I run the local server. I am in the development phase. Not production. Please assist. Thanks.

r,

Demayne

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/bde54c16-961b-4817-bc22-74ecabffd341%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK4qSCfNGnhD3cpFSWySxjwM%3D85%2BQgiyQN57fpzErKR_zLhO%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment