comparison gpp/templates/base.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 886cc99e8406
children 2f0a372c92b4
comparison
equal deleted inserted replaced
506:09a9402e4a71 507:8631d32e6b16
34 <script type="text/javascript" src="{{ STATIC_URL }}js/jquery.cycle.all.min.js"></script> 34 <script type="text/javascript" src="{{ STATIC_URL }}js/jquery.cycle.all.min.js"></script>
35 <script type="text/javascript" src="{{ STATIC_URL }}js/shoutbox.js"></script> 35 <script type="text/javascript" src="{{ STATIC_URL }}js/shoutbox.js"></script>
36 <link rel="shortcut icon" type="image/vnd.microsoft.com" href="{{ STATIC_URL }}favicon.ico" /> 36 <link rel="shortcut icon" type="image/vnd.microsoft.com" href="{{ STATIC_URL }}favicon.ico" />
37 {% if not user.is_authenticated %} 37 {% if not user.is_authenticated %}
38 {% script_tags "jquery-ui" %} 38 {% script_tags "jquery-ui" %}
39 <script type="text/javascript">var csrf_token = "{{ csrf_token }}";</script>
39 <script type="text/javascript" src="{{ STATIC_URL }}js/ajax_login.js"></script> 40 <script type="text/javascript" src="{{ STATIC_URL }}js/ajax_login.js"></script>
40 {% endif %} 41 {% endif %}
41 </head> 42 </head>
42 <body>{% block begin_body %}{% endblock %} 43 <body>{% block begin_body %}{% endblock %}
43 <div id="page" class="container"> 44 <div id="page" class="container">