Browse Source

Add info about working with VE and Python 3

Python 3 does not have execfile function.
pull/1603/head
Michael Klich 9 years ago committed by David Lord
parent
commit
99bc0dfd3b
  1. 6
      docs/deploying/mod_wsgi.rst

6
docs/deploying/mod_wsgi.rst

@ -193,5 +193,11 @@ Add the following lines to the top of your ``.wsgi`` file::
activate_this = '/path/to/env/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
For Python 3 add the following lines to the top of your ``.wsgi`` file::
activate_this = '/path/to/env/bin/activate_this.py'
with open(activate_this) as file_:
exec(file_.read(), dict(__file__=activate_this))
This sets up the load paths according to the settings of the virtual
environment. Keep in mind that the path has to be absolute.

Loading…
Cancel
Save