public
Last active

Django virtualenv shortcuts for ~/.bashrc

  • Download Gist
gistfile1.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# Django virtualenv helpers
VIRTUALENV_PROJECTS=~/projects
 
# work on virtualenv
function workon(){
cd $VIRTUALENV_PROJECTS/$1
source bin/activate
}
 
# Run Django management commands
# Assumes project directory is symlinked as `main` in the root of the virtualenv
function dmc(){
cd main
./manage.py $1
cd ..
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.