From 1af5ac87b5621ce73092092d54439960db6015a8 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 23 Jun 2010 07:23:55 +0200 Subject: [PATCH] activate virtualenv --- pandora/manage.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pandora/manage.py b/pandora/manage.py index 5e78ea979..b77df77ce 100755 --- a/pandora/manage.py +++ b/pandora/manage.py @@ -1,4 +1,14 @@ #!/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 try: import settings # Assumed to be in the same directory.