+<script>
+function worker() {
+ $.ajax({
+ data:{csrfmiddlewaretoken: '{{ csrf_token }}'},
+ url: "/refresh_done/",
+ type:"post",
+ success: function(data) {
+ window.location.href = "/refresh_done/";
+ },
+ complete: function() {
+ // Schedule the next request when the current one's complete
+ setTimeout(worker, 30000);
+ }
+ });
+};
+$(document).ready(function() {
+ // run the first time; all subsequent calls will take care of themselves
+ setTimeout(worker, 30000);
+});
+</script>
+{% endif %}
+
+{% endblock %}