Project

General

Profile

Enhancement #351 » passenger_wsgi.py

Marc Dequènes, 2014-09-21 19:25

 
import os
import sys

SITE_ROOT = os.path.dirname(os.path.realpath (__file__))
sys.path.insert (0, os.path.join(SITE_ROOT, "app/lib"))

from pyoto import PyotoRoot
import cherrypy

# should be out of pyoto-main.py
__builtins__["Version"] = "1.2.0-beta2"

root = PyotoRoot()
# Make "top" a global variable, that's dirty but sooo pleasant
__builtins__["top"] = root

cherrypy.config.update("/etc/pyoto/cherrypy.rc")
application = cherrypy.tree.mount(root, "/", "/etc/pyoto/pyoto.rc")
root.set_app(application)

    (1-1/1)