[extensions-web] sweettooth.wsgi.example: Use activate_this rather than addsitedir



commit 4a366daf5db67f4e5904016d76be40d79fcdd272
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Apr 2 12:18:23 2012 -0400

    sweettooth.wsgi.example: Use activate_this rather than addsitedir

 etc/sweettooth.wsgi.example |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/etc/sweettooth.wsgi.example b/etc/sweettooth.wsgi.example
index 513f92c..abd023d 100644
--- a/etc/sweettooth.wsgi.example
+++ b/etc/sweettooth.wsgi.example
@@ -7,9 +7,9 @@ os.environ['DJANGO_SETTINGS_MODULE'] = 'sweettooth.settings'
 
 _path = os.path.dirname(os.path.realpath(__file__))
 
-_venv = os.path.join(_path, 'venv/lib/python2.7/site-packages/')
+_venv = os.path.join(_path, 'venv/bin/activate_this.py')
 if os.path.exists(_venv):
-    site.addsitedir(_venv)
+    execfile(_venv, dict(__file__=_venv))
 
 sys.path.extend([_path, os.path.join(_path, 'sweettooth')])
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]