Forums

Even after updating the ALLOWED_HOSTS I still get Disallowed Host

I can't wrap my head around why I could be getting this error even if the URL is included in the allowed hosts. Is there anything that could help? I am saving the file and refreshing the site every time.Thanks.

Edit: It also seems that changing the Debug to False did not work, so maybe my settings.py file is just not being updated for some reason?

Are you reloading the site using the green button on the "Web" page inside PythonAnywhere? A normal browser refresh won't reload the code, it just makes a new request to the existing running code.

Yes, this is what I meant by refreshing the site, I am using the green button.

Can we take a look at your files? We can see them from our admin interface, but we always ask for permission first.

Yes, please, I am pretty sure I messed up the file system pushing and pulling from Github. I'd be thankful if you had a look.

You made changes to /home/mikekuberofficial/GameTheory/GameTheory/settings.py but you run your web app off /home/mikekuberofficial/GameTheory/GameTheory/GameTheory/settings.py

Its due to path = '/home/mikekuberofficial/GameTheory/GameTheory' in combination with os.environ['DJANGO_SETTINGS_MODULE'] = 'GameTheory.settings' in your /var/www/www_gametheoryforall_org_wsgi.py file.

It worked after I changed the path! Thank you very much!