This is the error I get when I visit 127.0.0.1:8000 in browser
DisallowedHost at /
Invalid HTTP_HOST header: '127.0.0.1:8000'. You may need to add '127.0.0.1' to ALLOWED_HOSTS.
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 2.0.2
Exception Type: DisallowedHost
Exception Value:
Invalid HTTP_HOST header: '127.0.0.1:8000'. You may need to add '127.0.0.1' to ALLOWED_HOSTS.
Before you yell at me and tell that you should add the it in your ALLOWED_HOSTS fields in settings.py, I already did that as indicated Why is Django throwing error "DisallowedHost at /"?.
Settings.py
field (I know if I put * then else everything is redundant, but still it gives me the same error.
ALLOWED_HOSTS = ['*','0.0.0.0','127.0.0.1']
This is my wsgi.py file
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wordtutor.settings")
# Uncommenting following also does not solve the error
#os.environ["DJANGO_SETTINGS_MODULE"] = "wordtutor.settings"
application = get_wsgi_application()
How can I solve this?
Edit : Python3.6 Django 2