Reputation: 1
I got this error message.
So I entered setting.py file and change like this
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '[::1]', '.pythonanywhere.com']
and Reload my site.
but nothing changed.
at this time, I changed the code like this
ALLOWED_HOSTS = ['heenamkang.pythonanywhere.com']
and then I got this error message. this is evidence that change is reflected.
But I still can't enter the 'heenamkang.anywhere.com'
Third and fourth images are captured at exactly the same time.
Upvotes: 0
Views: 144
Reputation: 132
Try adding the .
before your pythonanywhere url.
ALLOWED_HOSTS = ['127.0.0.1', '.heenamkang.pythonanywhere.com']
Upvotes: 0
Reputation: 676
Your first traceback shows your app running on PythonAnywhere. Other one shows the app running on your local machine.
ALLOWED_HOSTS = ['127.0.0.1', 'heenamkang.pythonanywhere.com']
should be enough to make it work in both environments.
Upvotes: 0
Reputation: 2752
Try this, it worked for me.
ALLOWED_HOSTS = ['127.0.0.1', u'heenamkang.pythonanywhere.com']
Upvotes: 0