0
votes

I'm learning Django. I created the following Projects/Apps

  1. first_project
    • first_app (Hello World - in view)
  2. ProTwo
    • AppTwo (My Second App - in view)

The apps just display text at the moment from the views. Both are set up exact same way.

In the first_project I ran python manage.py runserver and when I go to http://127.0.0.1:8000 I see the hello world.

In the AppTwo I ran python manage.py runserver also but when I go to http://127.0.0.1:8000 I still get hello world.

How do I resolve this so I display "My Second App" in the browser instead of "Hello World"?.

I've followed the steps in the course including information here

https://www.tutorialspoint.com/django/django_creating_project.htm

It is showing results from first Proj/App -> Hello World and NOT "My Second App"

1
Do you try to run both the apps in the same time or you are stopping the first one and after that running the second one?h3k
Two processes can't listen on the same port (8000). Start the second one on a different port, such as manage.py runserver 0.0.0.0:8001Selcuk

1 Answers

1
votes

You could just run the second server with a different port ./manage.py runserver 0.0.0.0: