Add info about working with VE and Python 3
Python 3 does not have execfile function.
This commit is contained in:
parent
1ac4156016
commit
99bc0dfd3b
1 changed files with 6 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue