Changeset 2484 for package_branches/invirt-web/cherrypy
- Timestamp:
- Sep 28, 2009, 3:04:32 AM (15 years ago)
- Location:
- package_branches/invirt-web/cherrypy/code
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
package_branches/invirt-web/cherrypy/code/main.fcgi
r2415 r2484 5 5 import os 6 6 import sys 7 from main import InvirtWeb 7 from main import InvirtWeb, InvirtUnauthWeb 8 8 9 9 dev = False … … 26 26 }) 27 27 app.merge(conf_file) 28 unauthApp = cherrypy.tree.mount(InvirtUnauthWeb(), 29 '/unauth', 30 {'/': {'tools.invirtwebstate.on': True}}) 31 unauthApp.merge(conf_file) 28 32 cherrypy.config.update(conf_file) 29 33 … … 35 39 cherrypy.engine.start(blocking=False) 36 40 from flup.server.fcgi import WSGIServer 37 server = WSGIServer( app)41 server = WSGIServer(cherrypy.tree) 38 42 server.run() -
package_branches/invirt-web/cherrypy/code/main.py
r2483 r2484 53 53 from view import View 54 54 import ajaxterm 55 56 class InvirtUnauthWeb(View): 57 @cherrypy.expose 58 @cherrypy.tools.mako(filename="/unauth.mako") 59 def index(self): 60 return {'simple': True} 55 61 56 62 class InvirtWeb(View): … … 710 716 return d 711 717 712 def unauthFront(_, _2, _3, fields): 713 """Information for unauth'd users.""" 714 return templates.unauth(searchList=[{'simple' : True, 715 'hostname' : socket.getfqdn()}]) 716 717 mapping = dict( 718 unauth=unauthFront) 718 mapping = dict() 719 719 720 720 def printHeaders(headers): -
package_branches/invirt-web/cherrypy/code/templates/unauth.mako
r2483 r2484 1 #from skeleton import skeleton 2 #extends skeleton 1 <%page expression_filter="h"/> 2 <%inherit file="skeleton.mako" /> 3 3 4 <%def name="title()"> 5 Intro 6 </%def> 4 7 5 #def title6 Intro7 #end def8 9 #def body10 8 <h1>XVM — Virtual Servers for MIT </h1> 11 9 … … 19 17 <p>MIT users:</p> 20 18 <blockquote><big><a 21 href="https://$ hostname/"><strong><font color="green">→</font> Log in to XVM now</strong>19 href="https://${config.web.hostname}/"><strong><font color="green">→</font> Log in to XVM now</strong> 22 20 </a></big></blockquote> 23 21 <p>You'll need an <a href="http://ca.mit.edu/">MIT personal … … 57 55 <p>Questions and feedback welcome at <a 58 56 href="mailto:xvm@mit.edu">xvm@mit.edu</a>.</p> 59 60 #end def
Note: See TracChangeset
for help on using the changeset viewer.