A simple middleware for Django applications to detect HTMX requests, adding an is_htmx attribute to the request object for convenient usage in views. It also includes a fix for handling redirects and works seamlessly with the django-template-partials.
- HTMX Detection: Automatically detects if a request originates from HTMX and adds an
is_htmxattribute to the request object. - Redirect Fix: Includes a modification to correctly handle redirects during HTMX requests.
- Integration: Works with
django-template-partialsfor partial rendering support.