I am doing a course : cs50 web programming with python and in project 2 Commerce while using
python manage.py runserver
I am getting this error:
This site can’t be reached 127.0.0.1 refused to connect.
this is project 2 commerce. https://cs50.harvard.edu/web/2020/projects/2/commerce/
I have not made any changes to the distribution code
for my last project I was able to make it work by using this code in settings.py :
ALLOWED_HOSTS = ["ide-2f9427eaa96d41debb489eacf31c97d6-8080.cs50.ws"]
and changing url to the same
but on using it in this project I get this error:
403 Forbidden
I am stuck please help me as soon as possible.
CodePudding user response:
check settings.py and make sure debug is set to True. Then go to allowed hosts and set it to ['*']. This will allow anyone on your system to connect to localhost server
CodePudding user response:
By default the server runs on port 8000 so you might want to try 127.0.0.1:8000 in your URL