Mercurial > public > sg101
comparison gpp/templates/weblinks/navigation.html @ 194:6a5549c2efb5
Implement #62, add support for CSRF protection.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 03 Apr 2010 20:00:56 +0000 |
parents | 952e05cb3d80 |
children | 7e8d2dda99e3 |
comparison
equal
deleted
inserted
replaced
193:fa7d82bfb100 | 194:6a5549c2efb5 |
---|---|
1 <div class="app-logo"> | 1 <div class="app-logo"> |
2 <img src="{{ MEDIA_URL }}icons/weblinks-logo.jpg" alt="Links Logo" title="Links" /> | 2 <img src="{{ MEDIA_URL }}icons/weblinks-logo.jpg" alt="Links Logo" title="Links" /> |
3 </div> | 3 </div> |
4 <div class="weblinks-search"> | 4 <div class="weblinks-search"> |
5 <form action="{% url weblinks-search page=1 %}" method="post"> | 5 <form action="{% url weblinks-search page=1 %}" method="post">{% csrf_token %} |
6 <p>{{ search_form.text }} <input type="submit" value="Search" /></p> | 6 <p>{{ search_form.text }} <input type="submit" value="Search" /></p> |
7 </form> | 7 </form> |
8 </div> | 8 </div> |
9 | 9 |
10 <ul class="app-menu"> | 10 <ul class="app-menu"> |
14 {% if user.is_authenticated %} | 14 {% if user.is_authenticated %} |
15 <li><a href="{% url weblinks.views.add_link %}">Add Link</a></li> | 15 <li><a href="{% url weblinks.views.add_link %}">Add Link</a></li> |
16 {% endif %} | 16 {% endif %} |
17 </ul> | 17 </ul> |
18 <center> | 18 <center> |
19 <form action="{% url weblinks.views.random_link %}" method="post"> | 19 <form action="{% url weblinks.views.random_link %}" method="post">{% csrf_token %} |
20 <input type="submit" value="Visit a Random Link" /> | 20 <input type="submit" value="Visit a Random Link" /> |
21 </form> | 21 </form> |
22 </center> | 22 </center> |