Tutorial - runserver freezes command prompt

554 views
Skip to first unread message

Scott Reed

unread,
Nov 29, 2018, 7:28:07 PM11/29/18
to Django users
Hi, I'm starting the Django polls tutorial.
I've followed all the steps so far: installed Python and Django, set up the virtual environment, etc.
I'm at the point where you start the Django development server by running 'py manage.py runserver' in the mysite directory.
When I execute this command in the command prompt window, it runs and brings up the message shown in the tutorial, with a couple variations on my computer:

Performing system checks...

System check identified no issues (0 silenced).

You have unapplied migrations; your app may not work properly until they are applied.
Run 'python manage.py migrate' to apply them.

November 28, 2018 - 15:50:53
Django version 2.1, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

Below this is a time/date stamp followed by "GET / HTTP/1.1" 200 16348

At this point, my command prompt window is frozen.  There's a blinking cursor (with no path to its left, like usual), and it doesn't accept any input.  The only thing that I can do is press CTRL-C to quit the server, which takes me back to the directory, where I can enter commands, but then I've quit the server.

Any ideas?

As a side note - whatever I type in while the server appears frozen will appear once I quit with CTRL-C.
Also, after quitting the server I tried to execute the 'py manage.py startapp polls' to create the polls directory.  It worked, and there is now a polls directory under the mysite directory, but I haven't been able to open views.py from the command line to complete the next step in the tutorial.

Jorge Gimeno

unread,
Nov 29, 2018, 8:59:05 PM11/29/18
to django...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b497916f-70f3-4023-b110-a8da95e6c975%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Scott,

Once you cursor disappears, your server is running and listening for requests. Open a browser and point it at http://127.0.0.1:8000 and see what happens!

-Jorge L. Gimeno

Scott Reed

unread,
Nov 30, 2018, 12:40:05 AM11/30/18
to Django users
Thanks for you response Jorge!  I see, that's just to check that it worked, and I'm supposed to quit the server to keep using the command prompt.
Another question: I can't figure out the next step - opening the views.py file in the command prompt.  
I've tried navigating to the directory and entering the filename, entering the file's full path, doing both of those with 'python' and 'python.exe' before them, adding python's path (I think) to my environmental variables path in Windows.  
I'm stuck.

Jorge Gimeno

unread,
Nov 30, 2018, 12:55:00 AM11/30/18
to django...@googlegroups.com


On Thu, Nov 29, 2018, 9:40 PM Scott Reed <akapro...@gmail.com wrote:
Thanks for you response Jorge!  I see, that's just to check that it worked, and I'm supposed to quit the server to keep using the command prompt.
Another question: I can't figure out the next step - opening the views.py file in the command prompt.  
I've tried navigating to the directory and entering the filename, entering the file's full path, doing both of those with 'python' and 'python.exe' before them, adding python's path (I think) to my environmental variables path in Windows.  
I'm stuck.

Scott,

To edit files you need a text editor of some sort. Notepad or Word are not very useful. A good one I have seen people use is Mu, located at https://codewith.mu. Notepad++ is another good option for Windows.

-Jorge

Scott Reed

unread,
Nov 30, 2018, 1:04:24 AM11/30/18
to Django users
Thanks again Jorge!  I'm such a noob :/  But this is a great learning experience.

Jorge Gimeno

unread,
Nov 30, 2018, 1:12:57 AM11/30/18
to django...@googlegroups.com
We all were there once. Keep moving forward!

-Jorge

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Jani Tiainen

unread,
Nov 30, 2018, 1:21:23 AM11/30/18
to django...@googlegroups.com
You might want to try Visual Studio Code as well. It has some integration with Python (for example code completion and flake8 and pylint checks on the fly).



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

For more options, visit https://groups.google.com/d/optout.


--
Jani Tiainen

- Well planned is half done, and a half done has been sufficient before...
Reply all
Reply to author
Forward
0 new messages