views:

43

answers:

1

I am having problems getting the logout link work in GAE (Python).

This is the page I am looking at.

In my template, I create a link

<p><a href="\users.create_logout_url("/")\">Logout</a></p>

But when I click on it I get "broken link" message from Chrome. The url for the link looks like this:

http://localhost:8085/users.create_logout_url(

My questions:

Can anybody explain how this works in general?

What is the correct url for the dev server?

What is the correct url for the app server?

What is the ("/") in the logout url?

Thanks.

EDIT

This link works; but I don't know why:

<p><a href="http://localhost:8085/_ah/login?continue=http%3A//localhost%3A8085/&amp;action=Logout"&gt;Logout&lt;/a&gt;&lt;/p&gt;
+1  A: 

What sort of templates are you using? It's clear from the output that you're not escaping your code correctly.

Nick Johnson
Hi, I am using Mako http://www.makotemplates.org/docs/syntax.html#syntax
Zeynel
Then you need to do ${users.create_logout_url("/")} to substitute in the result of that expression.
Nick Johnson