Last active
March 20, 2024 16:55
-
-
Save Alurith/84d331c0ecb7c9a2d575d73ed8f81985 to your computer and use it in GitHub Desktop.
Django & Htmx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- How to pass django's csrf_token with htmx --> | |
<!-- FROM: https://www.mattlayman.com/blog/2021/how-to-htmx-django/ --> | |
<html> | |
<head><title>Htmx Demo!</title></head> | |
<body | |
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}' | |
> | |
{% block main %}{% endblock %} | |
<script src="https://unpkg.com/htmx.org@1.1.0"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment