logging out link in a template

1 view
Skip to first unread message

Irvin Hwang

unread,
Apr 17, 2008, 12:04:33 PM4/17/08
to Google App Engine
Hi,

I'd like to have a logout link on all of my pages and I have a
base.html template that everything else extends. Is there a good way
to place a log out link in a base template without hardcoding the
output of users.create_logout_url() or passing it through the
template_values dictionary for every page? Thanks.

-ih

tj9991

unread,
Apr 17, 2008, 2:12:25 PM4/17/08
to Google App Engine
Why do you not wish to pass it through template_values? That's the
way it's meant to be done...

See http://code.google.com/p/google-app-engine-samples/source/browse/trunk/cccwiki/wiki.py
for the BaseRequestHandler, it's easy to use and it simplifies
generating templates across multiple functions.

Irvin Hwang

unread,
Apr 17, 2008, 9:54:47 PM4/17/08
to Google App Engine
Thanks, something like BaseRequestHandler was just what I was looking
for...

On Apr 17, 1:12 pm, tj9991 <tslo...@gmail.com> wrote:
> Why do you not wish to pass it through template_values? That's the
> way it's meant to be done...
>
> Seehttp://code.google.com/p/google-app-engine-samples/source/browse/trun...
Reply all
Reply to author
Forward
0 new messages