Changeset 2399 for package_branches/invirt-web/cherrypy/code
- Timestamp:
- Aug 9, 2009, 6:45:28 PM (15 years ago)
- Location:
- package_branches/invirt-web/cherrypy/code
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
package_branches/invirt-web/cherrypy/code/main.fcgi
r2387 r2399 20 20 app = cherrypy.tree.mount(InvirtWeb(), 21 21 '/' if dev else '/main.fcgi', 22 {'/': {'tools.staticdir.root': static_dir}, 22 {'/': {'tools.staticdir.root': static_dir, 23 'tools.invirtwebstate.on': True}, 23 24 '/static': {'tools.staticdir.on': True, 24 25 'tools.staticdir.dir': static_dir} -
package_branches/invirt-web/cherrypy/code/view.py
r2397 r2399 7 7 import datetime, decimal 8 8 from invirt.config import structs as config 9 from webcommon import State 9 10 10 11 class MakoHandler(cherrypy.dispatch.LateParamPageHandler): … … 100 101 cherrypy.tools.remote_user_login = cherrypy.Tool('on_start_resource', remote_user_login, priority=50) 101 102 103 def invirtwebstate_init(): 104 """Initialize the cherrypy.request.state object from Invirt""" 105 cherrypy.request.state = State(cherrypy.request.login) 106 107 cherrypy.tools.invirtwebstate = cherrypy.Tool('on_start_resource', invirtwebstate_init, priority=100) 108 102 109 class View(object): 103 110 _cp_config = {'tools.mako.directories': [os.path.join(os.path.dirname(__file__),'templates')]}
Note: See TracChangeset
for help on using the changeset viewer.