So senden Sie CSRF Middleware -Token in Django Ajax
{% csrf_token %}
<script>
const csrftoken = document.querySelector('[name=csrfmiddlewaretoken]').value;
</script>
Adorable Ant