How to keep typing in the terminal after 'python manage.py runserver' in Django?

Viewed 722

I was following along this tutorial on Django until minute 28:36 when the teacher uses a quick shortcut that appeared as ^C(trydjango) $ on the terminal, allowing him to continue typing to makemigrations after he did runserver.

When I try to type in the terminal after python manage.py runserver, the enter button does not submit the commands, but rather enters down to a newline making me stuck. I am unsure how to continue with the tutorial, so any help would be greatly appreciated.

2 Answers

allowing him to continue typing to makemigrations after he did runserver.

That is not the case. He used Ctrl+C (this is the origin of the ^C to stop the server).

Ctrl+C [wiki] is a seqeuence that will raise a SIGINT signal [wiki] to the process that is running, telling it you want it to interupt. Most processes will then try to stop running (for example after doing some tasks to store the state of the program).

In a lot of terminals however, you can make use of multiple tabs where one of the tabs is used to run the server whereas others are used to check files, the database, etc. On the Mac OS X Terminal Emulator, you can use ⌘ + T, whereas on LXTerminal and a lot of other Linux terminal emulators, you can use Ctrl + Shift + T.

Hows it going,

You just need to open a second terminal, and leave that one running. If youre using VSCode or PyCharm then you can just click the plus beside the terminal at the bottom and add another.

Related