KAngs
KAngs

Reputation: 1

How do I deploying website by PythonAnywhere.com

I got this error message.

enter image description here

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.

enter image description here

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.

enter image description here

enter image description here

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

Answers (3)

Slyme
Slyme

Reputation: 132

Try adding the . before your pythonanywhere url.

ALLOWED_HOSTS = ['127.0.0.1', '.heenamkang.pythonanywhere.com']

Upvotes: 0

Filip
Filip

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

weAreStarsDust
weAreStarsDust

Reputation: 2752

Try this, it worked for me.

ALLOWED_HOSTS = ['127.0.0.1', u'heenamkang.pythonanywhere.com']

Upvotes: 0

Related Questions