From: Peter Iannucci Date: Sat, 21 Feb 2009 03:09:34 +0000 (-0500) Subject: Fixed the log in link for xvm-dev by using environ['HOSTNAME'] X-Git-Tag: 0.0.21~11 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/4ce9e31db6102ba0d2597e2e62d23c484450d85d?hp=9fcc8cfc4797aafbc674ea78e42e5e51bdb0cf5e Fixed the log in link for xvm-dev by using environ['HOSTNAME'] svn path=/trunk/packages/invirt-web/; revision=2182 --- diff --git a/code/main.py b/code/main.py index dd60e96..b6f7b7f 100755 --- a/code/main.py +++ b/code/main.py @@ -12,6 +12,7 @@ import simplejson import sys import time import urllib +import os from StringIO import StringIO def revertStandardError(): @@ -606,7 +607,8 @@ def info(username, state, path, fields): def unauthFront(_, _2, _3, fields): """Information for unauth'd users.""" - return templates.unauth(searchList=[{'simple' : True}]) + return templates.unauth(searchList=[{'simple' : True, + 'hostname' : os.environ['HOSTNAME'] if 'HOSTNAME' in os.environ else 'xvm.mit.edu'}]) def admin(username, state, path, fields): if path == '': diff --git a/code/templates/unauth.tmpl b/code/templates/unauth.tmpl index e8b21ea..0715f2c 100644 --- a/code/templates/unauth.tmpl +++ b/code/templates/unauth.tmpl @@ -18,7 +18,7 @@ to any Athena account holder.

MIT users:

Log in to XVM now +href="https://$hostname/"> Log in to XVM now

You'll need an MIT personal certificate.