adamchainz / django-htmx

Extensions for using Django with htmx.
https://django-htmx.readthedocs.io/
MIT License
1.66k stars 140 forks source link

Extend HttpResponseLocation to Support select Attribute #461

Closed NikolaAnovic closed 4 months ago

NikolaAnovic commented 4 months ago

Description

I would like to propose an enhancement to the HttpResponseLocation class. Currently, this class provides a way to handle HTTP responses with location headers, primarily supporting URL redirection. However, the HTMX library also supports a select element as part of the hx-location feature, which allows for more dynamic client-side redirections.

ReferencesHTMX hx-location documentationdjango-htmx HttpResponseLocation source code

I am willing to implement this feature and submit a pull request for review.

adamchainz commented 4 months ago

Great, this was added to htmx later per https://github.com/bigskysoftware/htmx/pull/2022 . Reviewing PR now.