Jim's
Tutorials

Spring 2018
course
site

Nate's Work - Feb 20

activate_this = '/path/to/env/bin/activate_this.py'
with open(activate_this) as file_:
    exec(file_.read(), dict(__file__=activate_this))

Jim says

Here is my umber.wsgi. The project is in /var/www/umber .

activate_this = '/var/www/umber/venv/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
import sys; sys.path.insert(0,  '/var/www/umber/src')
from umber import app as application

In apache.conf I have

   # umber course management system via wsgi                                        
   # debugging loglevl trace1 to trace8 ; trace8 prints more.                       
   #LogLevel trace4                                                                 
   WSGIDaemonProcess umber
   WSGIScriptAlias /cours /var/www/umber/src/umber.wsgi
   <Directory /var/www/umber/src>
      WSGIProcessGroup umber
      WSGIApplicationGroup %{GLOBAL}
      Require all granted
   </Directory>