I am taking "CS50’s Web Programming with Python and JavaScript" and I have reached lecture 3 - Django. I am using the CS50 IDE for my program and I have done every step to start the basic default Django webpage, but I found the webpage saying : refused to connect. I have no idea what the problem is but when I surfed I have found that I could change my IP address, but that didn't help me. Hope you could help me with this.


Type python manage.py runserver in the terminal. At the top right corner of the terminal, you will see a link. Click on that. Copy the link. Then in the settings.py file of the app, go to allowed host. Change it like this. ["{{ Whatever link you got }}", ""] This helped me and will help you too.

If this helps, please check the tickmark.

  • I did not find any link except link but tried to put that one as you informed me. However, I still got, no difference, it isn't working again.
    – amew646
    Oct 7 '20 at 19:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .