let csrf = $('input[name=csrfmiddlewaretoken]').val();
let userId = $('#user').val();
document.querySelectorAll('[data-id]').forEach(function (el) {
$.post(el.getAttribute('data-url'), {task: el.getAttribute('data-id'), user: userId, csrfmiddlewaretoken: csrf}, function (json) {})
})
$.post($('#presentBtn').attr('data-url'), {csrfmiddlewaretoken: csrf, email: ''}, function (json) {
var presentBlock = $('#presentBtn').next('div').find('a.js-present');
var present = json['data'].present;
let a = document.createElement('a')
presentBlock[0].appendChild(a);
a.href = present;
a.innerHTML = present
})