<%init> s = m.get_session() user = s.get('user', None) quotes = [ "Welcome User #1!", 'We Put the "P" in "Plain"', 'The Best Completely Unfinished Blog App Out There', 'Voted #1 - On Your Desktop', 'Its a Great Idea - While it Lasts', 'Over One Million Downloads - In Backwards Negative UpsideDown Land !', "Has No Graphics - *And* Doesn't Work in Lynx !", "Oh We've Got Monkeys. And They're Typin'....Just You Wait.", ] import random quote = quotes[random.randint(0, len(quotes)-1)]
Zblog - "<% quote %>"
% if user is not None:
you are logged in as <% user.name %>
% Home <&|/components:securehref, href="/blog/my/", action=actions.LoggedIn() &>My Blogs <&|/components:securehref, href="/manage/", action=actions.Manage() &>Manage % if user is not None: Logout % else: <&|/components:securehref, href="/login/", action=actions.Login() &>Login <&|/components:securehref, href="/login/register/", action=actions.Register() &>Register %