-
-
Save manuganji/9069466 to your computer and use it in GitHub Desktop.
virtualenv postactivate and postdeactivate files for django. Place these files at $VIRTUAL_ENV/bin. That is inside the bin folder inside the virtualenv directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This hook is run after this virtualenv is activated. | |
# Place this file at $VIRTUAL_ENV/bin | |
# I usually drop something like this into my virtualenv's postactivate for some | |
# quick and handy shortcuts to common Django commands. | |
# This way dropping in to do some work on any arbitrary project is as easy as: | |
# 1. workon <project name> | |
# 2. djr | |
#Django command shortcuts | |
alias dj='python manage.py' # or some other file like manage_custom.py | |
alias djr='dj runserver' | |
alias djdb='dj dbshell' | |
alias djs='dj shell' | |
alias djt='dj test' | |
alias djm='dj migrate' | |
alias djsm='dj startmigration' | |
alias cvt='coverage run --source=. manage_freebase.py test .' | |
#For more ideas/inspiration on managing settings across environments see: | |
#http://github.com/tarequeh/django-config | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This hook is run after this virtualenv is deactivated. | |
# unset all aliases to leave things clean after you deactivate | |
unalias dj | |
unalias djr | |
unalias djdb | |
unalias djs | |
unalias djt | |
unalias djm | |
unalias djsm | |
unalias cvt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment