Closed ftnext closed 4 years ago
In the chapter of authentication_authorization,
Now try to access http://localhost:8000/post/new/
but we saw error page of disallowed host, because settings.ALLOWED_HOSTS does NOT contain 'localhost'. It contains '127.0.0.1', so we can access http://127.0.0.1:8000/post/new/ . ref: Django Girls Tutorial | changing settings
settings.ALLOWED_HOSTS
'localhost'
'127.0.0.1'
In other chapters of extensions, we are instructed to access http://127.0.0.1:8000/drafts/ (in chapter add more to your web site)
Thank you!
In the chapter of authentication_authorization,
but we saw error page of disallowed host, because
settings.ALLOWED_HOSTS
does NOT contain'localhost'
. It contains'127.0.0.1'
, so we can access http://127.0.0.1:8000/post/new/ . ref: Django Girls Tutorial | changing settingsIn other chapters of extensions, we are instructed to access http://127.0.0.1:8000/drafts/ (in chapter add more to your web site)