I'm a beginner in Django and I'm studying Django from the book "Django 2 by Example", written by Antonio Mele. I'm trying to add social authentication to my site(book page no. 251) {project name-bookmark, app name-account}. Up to this point, I'm installed the Django package
"social-auth-app-django",
synced python-social-auth models with database using migration and added "social_django" to the INSTALLED_APPS settings of my project. Then I've added
path('social-auth/', include('social_django.urls', namespace='social')),
now it is telling me to edit my hosts file located at "C:\Windows\System32\Drivers\etc\hosts" and to add "127.0.0.1 mysite.com" line which I've added. After this running server "http://example.com:8000/account/login/" should give error, here example.com is actually mysite.com,
DisallowedHost at /account/login: Invalid HTTP_HOST header:'mysite.com:8000'.You may need to add 'mysite.com' to ALLOWED_HOSTS.
But I don't know why it isn't showing instead of that it gives me "This site can’t be reached. mysite.com refused to connect."
But it works perfectly fine at 127.0.0.1:8000. Please help me I'm stuck. I've searched on google as well as watched videos on youtube but still, this error can't be solved(generated) by me.