From: Paul Weaver
Date: Wed, 30 Dec 2009 20:18:56 +0000 (-0500)
Subject: Added some code to display a service message from the xvm team to the unauth page...
X-Git-Tag: 0.1.5~10
X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/c540be1b6b42026b142e3675e008298f7ff672ce
Added some code to display a service message from the xvm team to the unauth page of the website. The message lives in /etc/invirt/message, which would be symlinked to afs
svn path=/trunk/packages/invirt-web/; revision=2810
---
diff --git a/code/main.py b/code/main.py
index dd2b591..b05906e 100755
--- a/code/main.py
+++ b/code/main.py
@@ -51,7 +51,13 @@ class InvirtUnauthWeb(View):
@cherrypy.expose
@cherrypy.tools.mako(filename="/unauth.mako")
def index(self):
- return {'simple': True}
+ if(os.path.exists("/etc/invirt/message")):
+ f = open('/etc/invirt/message')
+ message = f.read()
+ else:message = None
+ d = dict(simple = True, serviceMessage = message)
+ return d
+
class InvirtWeb(View):
def __init__(self):
diff --git a/code/templates/unauth.mako b/code/templates/unauth.mako
index 3544e18..dc49d8f 100644
--- a/code/templates/unauth.mako
+++ b/code/templates/unauth.mako
@@ -13,6 +13,11 @@ own complete system on which you can start from our three-minute
Debian or Ubuntu install or install the operating
system of your choice. The service is free
to any Athena account holder.
+%if serviceMessage:
+
+%endif
MIT users: