From: Quentin Smith Date: Sun, 9 Aug 2009 22:45:35 +0000 (-0400) Subject: Get username from cherrypy request object X-Git-Tag: 0.1.0^2~58 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/c8d4c0b540095113a4c605b445536050791ba7c9 Get username from cherrypy request object svn path=/package_branches/invirt-web/cherrypy-rebased/; revision=2677 --- diff --git a/code/main.py b/code/main.py index 593b9f0..47f9b01 100755 --- a/code/main.py +++ b/code/main.py @@ -139,8 +139,7 @@ console will suffer artifacts. if not isinstance(subject, list): subject = [subject] - return dict(user=cherrypy.request.login, - simple=simple, + return dict(simple=simple, subjects=subject, mapping=help_mapping) help._cp_config['tools.require_login.on'] = False diff --git a/code/templates/skeleton.mako b/code/templates/skeleton.mako index d602252..a619a67 100644 --- a/code/templates/skeleton.mako +++ b/code/templates/skeleton.mako @@ -46,8 +46,8 @@ function helppopup(name){ % endif % if not simple: -% if user: -

Welcome, ${user}.

+% if cherrypy.request.login: +

Welcome, ${cherrypy.request.login}.

% endif