Browse Source

Updating main page to include login/logout/registration links

David Leonard 10 years ago
parent
commit
5d61f1b5d5
1 changed files with 9 additions and 2 deletions
  1. 9 2
      hackathon_starter/hackathon/templates/hackathon/index.html

+ 9 - 2
hackathon_starter/hackathon/templates/hackathon/index.html

@@ -10,8 +10,15 @@
     <body>
         <h1>Api Example</h1>
         <strong>{{ boldmessage }}</strong><br />
-
-        <!-- New line -->
     </body>
 
+{% if user.is_authenticated %}
+<a href="/hackathon/logout/">Logout</a><br />
+{% else %}
+<a href="/hackathon/register/">Register Here</a><br />
+<a href="/hackathon/login/">Login</a><br />
+{% endif %}
+
+
+
 </html>