Reputation: 121
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:
python manage.py runserver 8001
, it shows App 2 page.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.
Upvotes: 0
Views: 687
Reputation: 1
Turning comments on the question (by KailiC and Jerven Clark) into an answer:
Deleting chrome cache helps.
Upvotes: 0
Reputation: 631
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
Upvotes: 0