Commit ef8a6fa1 authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Parses logout token and myaccount token.

parent c7532943
......@@ -338,6 +338,12 @@ def get_top( logged_in=False ):
top = f.read()
f.close()
myaccount = """| [ <a href="/account">My Account</a> ]"""
if logged_in:
top = top.replace( "%{myaccount}%", myaccount )
else:
top = top.replace( "%{myaccount}%", "" )
mylinks = """| [ <a href="/mylinks">My Links</a> ]"""
if logged_in:
top = top.replace( "%{mylinks}%", mylinks )
......@@ -352,6 +358,12 @@ def get_bottom( logged_in=False ):
bottom = f.read()
f.close()
logout = """<a href="/logout">Log Out</a>"""
if logged_in:
bottom = bottom.replace( "%{logout}%", logout )
else:
bottom = bottom.replace( "%{logout}%", "" )
return bottom
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment