Reputation: 1436
I'm running into problems trying to use "python manage.py runserver."
According to the tutorial, I'm supposed to get a “Welcome to Django” screen when I visit my development server at http://127.0.0.1:8000/
but instead, I see one of my previous projects that's locally hosted on my computer. I'm wondering why this is, do I have to more specific or specify another when I use "python manage.py runserver"
Upvotes: 0
Views: 1906
Reputation: 37876
if you have other local servers running (and want them to run paralell), then run your new project in another port like:
python manage.py runserver 127.0.0.1:8001 # it normally runs at :8000
Upvotes: 1
Reputation: 4996
It looks like you have an application listening on port 8000. Try running the following command, it should kill the application listening on 8000 and then you can try to restart your application again:
if [ `lsof -i:8000 -t` ]; then echo "Killing Following"; lsof -i:8000; kill `lsof -i:8000 -t`; fi;
Upvotes: 1
Reputation: 1828
You do not have to do more than you have done, however, you should make sure that you do not have the server from your previous project running, for one.
To confirm, are you at the point in the tutorial where you have run django-admin.py startproject mysite
. You have also run python manage.py migrate
.
Also, make sure that you are running python manage.py runserver
such that the manage.py
you are running corresponds to the manage.py
in your new tutorial project. That is, check which directory you are running from.
Upvotes: 0