Mercurial > public > sg101
annotate gpp/templates/weblinks/link.html @ 507:8631d32e6b16
Some users are still having problems with the pop-up login. I think they are actually getting 403s because of the CSRF protection. So I have modified the base template to always have a javascript variable called csrf_token available when they aren't logged in. The ajax_login.js script was then modified to send this value with the ajax post. Fingers crossed.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 04 Dec 2011 03:05:21 +0000 |
parents | 3c48a555298d |
children |
rev | line source |
---|---|
bgneal@310 | 1 {% load url from future %} |
bgneal@492 | 2 {% load bio_tags %} |
gremmie@1 | 3 <dt> |
bgneal@209 | 4 <h4><a href="{{ link.url }}">{{ link.title }}</a></h4> |
gremmie@1 | 5 </dt> |
gremmie@1 | 6 <dd> |
gremmie@1 | 7 <p>{{ link.description }}</p> |
bgneal@310 | 8 <form action="{% url 'weblinks-visit' link.id %}" method="post">{% csrf_token %} |
gremmie@1 | 9 <table class="link-stats"> |
gremmie@1 | 10 <tr> |
bgneal@492 | 11 <th>Added by:</th><td>{% profile_link link.user.username %}</td> |
bgneal@310 | 12 <th>Category:</th><td><a href="{% url 'weblinks-view_links' slug=link.category.slug sort='date' %}">{{ link.category.title }}</a></td> |
bgneal@209 | 13 </tr> |
bgneal@209 | 14 <tr> |
bgneal@165 | 15 <th>Date Added:</th><td>{{ link.date_added|date:"M d, Y" }}</td> |
gremmie@1 | 16 <th>Hits:</th><td>{{ link.hits }}</td> |
bgneal@3 | 17 <td> |
bgneal@312 | 18 <a href="#" class="weblinks-broken" id="link-{{ link.id }}"><img src="{{ STATIC_URL }}icons/link_break.png" alt="Broken Link" title="Report this link as broken" /></a> |
bgneal@3 | 19 </td> |
gremmie@1 | 20 </tr> |
bgneal@165 | 21 <tr><td><input type="submit" value="Visit Site" /></td></tr> |
gremmie@1 | 22 </table> |
bgneal@165 | 23 </form> |
gremmie@1 | 24 <br /> |
gremmie@1 | 25 </dd> |