From c8d4c0b540095113a4c605b445536050791ba7c9 Mon Sep 17 00:00:00 2001 From: Quentin Smith Date: Sun, 9 Aug 2009 18:45:35 -0400 Subject: [PATCH] Get username from cherrypy request object svn path=/package_branches/invirt-web/cherrypy-rebased/; revision=2677 --- code/main.py | 3 +-- code/templates/skeleton.mako | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) 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