https://htmx.org logo
Based on the source code and the doc here : https:...
# 🔥-django-htmx
r
Based on the source code and the doc here : https://django-htmx.readthedocs.io/en/latest/http.html#django_htmx.http.HttpResponseClientRedirect It seems it's just a way to transform the "natural" response location, to a
HX-Redirect
attribute, to trigger the redirection from the client, using HTMX. I can't help more as I have no example usage in mind right now.
Copy code
python
class HttpResponseClientRedirect(HttpResponseRedirectBase):
    status_code = 200

    def __init__(self, redirect_to: str, *args: Any, **kwargs: Any) -> None:
        super().__init__(redirect_to, *args, **kwargs)
        self["HX-Redirect"] = self["Location"]
        del self["Location"]