Sfoglia il codice sorgente

Updating main page to include login/logout/registration links

David Leonard 10 anni fa
parent
commit
5d61f1b5d5

+ 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>