Changeset 2692 for package_branches/invirt-web
- Timestamp:
- Dec 20, 2009, 9:45:47 PM (15 years ago)
- Location:
- package_branches/invirt-web/cherrypy-rebased/code
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
package_branches/invirt-web/cherrypy-rebased/code/main.fcgi
r2681 r2692 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-rebased/code/main.py
r2691 r2692 47 47 48 48 from view import View 49 50 class InvirtUnauthWeb(View): 51 @cherrypy.expose 52 @cherrypy.tools.mako(filename="/unauth.mako") 53 def index(self): 54 return {'simple': True} 49 55 50 56 class InvirtWeb(View): … … 655 661 return d 656 662 657 def unauthFront(_, _2, _3, fields): 658 """Information for unauth'd users.""" 659 return templates.unauth(searchList=[{'simple' : True, 660 'hostname' : socket.getfqdn()}]) 661 662 mapping = dict( 663 unauth=unauthFront) 663 mapping = dict() 664 664 665 665 def printHeaders(headers): -
package_branches/invirt-web/cherrypy-rebased/code/templates/unauth.mako
r2691 r2692 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.