mirror of
https://github.com/aquatix/digimarks.git
synced 2025-12-06 20:55:10 +01:00
Python 2+3
This commit is contained in:
6
wsgi.py
6
wsgi.py
@@ -1,9 +1,11 @@
|
|||||||
# Activate virtualenv
|
# Activate virtualenv
|
||||||
import settings
|
import settings
|
||||||
#activate_this = getattr(settings, 'VENV', None)
|
activate_this = getattr(settings, 'VENV', None)
|
||||||
|
# FIXME: python 2 *and* python 3 compatibility
|
||||||
|
# Python 2
|
||||||
#if activate_this:
|
#if activate_this:
|
||||||
# execfile(activate_this, dict(__file__=activate_this))
|
# execfile(activate_this, dict(__file__=activate_this))
|
||||||
activate_this = getattr(settings, 'VENV', None)
|
# Python 3
|
||||||
with open(activate_this) as file_:
|
with open(activate_this) as file_:
|
||||||
exec(file_.read(), dict(__file__=activate_this))
|
exec(file_.read(), dict(__file__=activate_this))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user