Skip to content

Instantly share code, notes, and snippets.

@Riverfount
Last active March 6, 2018 22:56
Show Gist options
  • Save Riverfount/b58b2af16c03ee09e65c16032760c0e8 to your computer and use it in GitHub Desktop.
Save Riverfount/b58b2af16c03ee09e65c16032760c0e8 to your computer and use it in GitHub Desktop.
#!/bin/zsh
# This hook is sourced after every virtualenv is activated.
# Put this file in the ~/.envs/ directory
alias manage="$VIRTUAL_ENV/bin/python $(pwd)/manage.py"
alias test="$VIRTUAL_ENV/bin/python $(pwd)/manage.py test"
alias startapp="$VIRTUAL_ENV/bin/python $(pwd)/manage.py startapp"
alias runserver="$VIRTUAL_ENV/bin/python $(pwd)/manage.py runserver"
alias testm="$VIRTUAL_ENV/bin/python $(pwd)/manage.py test --nomigrations"
alias makemigrations="$VIRTUAL_ENV/bin/python $(pwd)/manage.py makemigrations"
alias migrate="$VIRTUAL_ENV/bin/python $(pwd)/manage.py migrate"
alias shell="$VIRTUAL_ENV/bin/python $(pwd)/manage.py shell"
alias shellp="$VIRTUAL_ENV/bin/python $(pwd)/manage.py shell_plus"
alias createsuperuser="$VIRTUAL_ENV/bin/python $(pwd)/manage.py createsuperuser"
cd $PROJECT_HOME/"$(basename ${VIRTUAL_ENV})"/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment