Source code for django_htmx_tools.utils.htmx
from django.http import HttpRequest
[docs]
def is_htmx(request: HttpRequest):
"""
Check if a request is HTMX
:param request:
:return: True if the request is HTMX, False otherwise
"""
return request.headers.get("Hx-Request") == "true"