I am just starting with Django for the first time. So I create a django project and run the command
python3 manage.py runserver 0.0.0.0:8000
Instead of getting the expected django homepage, I get the following error message,
DisallowedHost at /
Invalid HTTP_HOST header: '0.0.0.0:8000'. You may need to add '0.0.0.0' to ALLOWED_HOSTS.
Request Method: GET
Request URL: http://0.0.0.0:8000/
Django Version: 1.10.5
Exception Type: DisallowedHost
Exception Value:
Invalid HTTP_HOST header: '0.0.0.0:8000'. You may need to add '0.0.0.0' to ALLOWED_HOSTS.
Exception Location: /usr/local/lib/python3.5/site-packages/django/http/request.py in get_host, line 113
Python Executable: /usr/local/opt/python3/bin/python3.5
Python Version: 3.5.2
I haven't scratched the django surface yet, so it would be helpful to help how to fix this?
source
share