0

I am following a basic django project, mainly so I can see it run on the browser, because I have another django project where it says it runs on http//127.0.0.1:8000/ but on my browser it shows errors. I am working linode in cmd on windows laptop, I have edited my firewall on linode to allow ssh, http and https.

https://docs.djangoproject.com/en/4.0/intro/tutorial01/

this is the tutorial I am following.

my code

This is what my code says in cmd.

the browser

This is what my browser says.

Marat
  • 15,215
  • 2
  • 39
  • 48
Vanya Novikov
  • 51
  • 1
  • 1
  • 2

1 Answers1

0

The tutorial assumes your test server is running on the same machine; 127.0.0.1 is a shorthand for it. Your server is actually running on linode, so you need two things:

  • expose the server interface outside, as 127.0.0.1 is only accessible internally. The command is: python manage.py runserver 0.0.0.0:8000, see this question for more details.
  • access it by the remote machine IP/hostname and expose server on external interface. So, in your browser, instead of 127.0.0.1:8000, use <linode_machine_IP>:8000
Marat
  • 15,215
  • 2
  • 39
  • 48