2010-12-29

Note to Self: Source Django's bash Completion Automatically

If you're using Doug Hellman's awesome virtualenvwrapper to manage your Django projects—and you really should be—try adding the following line to your $VIRTUAL_ENV/bin/postactivate script:


source "$VIRTUAL_ENV/build/Django/extras/django_bash_completion"

If you used the --no-site-packages option to create the virtualenv, that should automatically source the Django bash completion script everytime you workon into your project. If you didn't, you just need to figure out where the Django bash completion script is squirreled away on your system and use that path instead. BTW, --no-site-packages should really be the default.

Back to flipping out...

blog comments powered by Disqus