activate virtualenv

This commit is contained in:
j 2010-06-23 07:23:55 +02:00
parent 6bbf215870
commit 1af5ac87b5

View file

@ -1,4 +1,14 @@
#!/usr/bin/env python #!/usr/bin/env python
import os
root_dir = os.path.normpath(os.path.abspath(os.path.dirname(__file__)))
os.chdir(root_dir)
#using virtualenv's activate_this.py to reorder sys.path
activate_this = os.path.join(root_dir, '..', 'bin', 'activate_this.py')
execfile(activate_this, dict(__file__=activate_this))
from django.core.management import execute_manager from django.core.management import execute_manager
try: try:
import settings # Assumed to be in the same directory. import settings # Assumed to be in the same directory.