Last Updated: February 25, 2016
·
2.297K
· ronelliott

Helpful Bash Aliases for Django

Here are some helpful aliases for bash that will make your fingers not hate you as much:

alias pm="python manage.py"
alias pmcs="python manage.py collectstatic --noinput"
alias pmdbsh="python manage.py dbshell"
alias pmdd="python manage.py dumpdata"
alias pmld="python manage.py loaddata"
alias pmm="python manage.py migrate"
alias pmsh="python manage.py shell"
alias pmsm="python manage.py schemamigration"
alias pmsync="python manage.py syncdb --noinput"
alias pmt="python manage.py test"
alias prs="python manage.py runserver"

Github
They can also be found in gist form here:
https://gist.github.com/ronelliott/5182239

Install
There are a few options here so you can pick which suits you best:

  • Copy the code above into a file in your home directory and source it in your .bashrc / .bash_profile

  • Copy the code above directly into your .bashrc / .bash_profile

  • Clone the gist to a file in your home directory and source it in your .bashrc / .bash_profile