0

I am learning Django so I've created many Django webapps under one directory. For example,

\webapps
  \polls
    \polls
    \api
    \manage.py
    ...
  \ponynote
    \ponynote
    \frontend
    \manage.py
    ...

I didn't use a virtualenv for developing django apps. I don't know whether it's the reason that causes the problem as below.

App 1 python manage.py runserver works all fine. (default port 8000)

App 2 python manage.py runserver still shows the App 1 page.

Method I tried:

  • change the port python manage.py runserver 8001, it shows App 2 page.
  • try to find the process ID PID, and kill it. No sign of port 8000.

However, this isn't the best solution since I can't change the port everytime when developing a new django app. Does anyone have a clue why this happens? Kudos.

Problem solved: remove web browser cache. In my case, it's Chrome.

KailiC
  • 111
  • 1
  • 10

1 Answers1

0

One effective solution would be to create a bash script for your use. Create 2 separate bash scripts for your projects (The same dir where your project's manage.py can be found).

For App 1:

# script- App 1
python manage.py runserver 0.0.0.0:8000

For App 2:

# script- App 2
python manage.py runserver 0.0.0.0:8080

And for running:

./yourbashscriptfile
Pranava Mohan
  • 533
  • 2
  • 8
  • 18