{% extends "base.html" %}
-
+{% load i18n lazysignup_tags %}
{% block content %}
<ul class="list-group">
</div>
</li>
-
+ {% if not user|is_lazy_user %}
<li class="list-group-item new-task-item task-item">
<form action="/add/" method="post">
{% csrf_token %}
</div>
</form>
</li>
-
+ {% endif %}
<li class="list-group-item task-item">
<div class="col-xs-1">
done
{% endfor %}
</ul>
+{% if not alldone %}
+<script src="/static/jquery.min.js"></script>
+
+<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 %}
\ No newline at end of file
+{% endblock %}