Skip to content

Instantly share code, notes, and snippets.

@faulander
Last active July 17, 2021 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save faulander/008fffb4236ebbf7d2cb9b6806950efa to your computer and use it in GitHub Desktop.
Save faulander/008fffb4236ebbf7d2cb9b6806950efa to your computer and use it in GitHub Desktop.
[Include htmx in Django Webpages] #htmx #django #python
<script>
document.body.addEventListener('htmx:configRequest', (event) => {
event.detail.headers['X-CSRFToken'] = '{{ csrf_token }}';
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment