KailiC
KailiC

Reputation: 121

python manage.py runserver shows an old webapp page I developed

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:

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

Answers (2)

EscapeBaek
EscapeBaek

Reputation: 1

Turning comments on the question (by KailiC and Jerven Clark) into an answer:

Deleting chrome cache helps.

Upvotes: 0

Pranava Mohan
Pranava Mohan

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

Related Questions