{% block extra_head %}
functionsendtwitter(){
$('#myModal form').submit(function(){
$.ajax({
type:"POST",
data: $('#myModal form').serialize(),
url:"{% url add %}",
cache:false,
dataType:"html",
success:function(html, textStatus) {
$('#todo').replaceWith(html);
$('#myModal').modal('hide');
$('#myModal form')[0].reset();
},
error:function(XMLHttpRequest, textStatus, errorThrown) {
$('#comment_form form').replaceWith('Your comment was unable to be posted at this time. We apologise for the inconvenience.');
}
});return false;
});
}
$(document).ready(function(){
sendtwitter();
}){% endblock %}
{% block todo %}
待办事项
{% for todo in todolist %}{% if todo.priority == '1' %}{% endif %}
{% if todo.priority == '2' %}{% endif %}
{% if todo.priority == '3' %}{% endif %}{{ todo.todo }}
{% endfor %}
{% for ftodo in finishtodos %}
{{ ftodo.todo }}
{% endfor %}
ADD
{% endblock %}