Working my way through a Django tutorial, I have run django-admin startproject mysite
. Now I cannot get the next step to work.
$ python manage.py runserver
>>>
$
where the blank line is where Ctrl-C
was entered to break the loop. The >>>
was the prompt I defined for the virtualenv. In other words, no output.
Most importantly, I get a connection refused error when connecting to http://127.0.0.1:8000
. I do not get the the "'Welcome to Django' page, in pleasant, light-blue pastel" as described in the tutorial.
For other commands python manage.py
works correctly. For example:
$ python manage.py check
System check identified no issues (0 silenced).
$ python manage.py shell --command 'import sys; print(sys.version)'
3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit (AMD64)]
$/ python manage.py shell --command 'import django; print(django.__version__)'
1.11.2
I am at loss for how explore further. I have tried:
LOCALHOST
.I am at loss for other steps to debug this problem.
If you didn't change something in the settings.py you should enter the service in
localhost:8000
Using the same machine where you are runing the server.
If you want to enter from another computer in the same network you should use
$ python manage.py runserver 0.0.0.0:8000
And change your "allowed hosts" to the ip of your computer or to *
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With