How-To: Manually restart django development server

Here is how:

1. Script

2. Run

bash ~/restart-runserver.sh

If you are asked to enter password every-time, you can change file permissions to avoid that. To change file permissions run:

sudo chmod 700 ~/restart-runserver.sh

3. Alias

echo "alias rst='bash ~/restart-runserver.sh'" >> ~/.bashrc

To add an alias, if using zsh terminal, run:

echo "alias rst='bash ~/restart-runserver.sh'" >> ~/.zshrc

Don’t forget to either source your rc file or restart your terminal for alias to work.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store