Add info about working with VE and Python 3

Python 3 does not have execfile function.
This commit is contained in:
Michael Klich 2015-10-29 11:24:39 +00:00 committed by David Lord
parent 1ac4156016
commit 99bc0dfd3b

View file

@ -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.