File: changelog.rst

package info (click to toggle)
django-htmx 1.23.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 816 kB
  • sloc: javascript: 3,395; python: 956; makefile: 27; sh: 19
file content (273 lines) | stat: -rw-r--r-- 8,529 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
=========
Changelog
=========

1.23.2 (2025-06-27)
-------------------

* Upgrade the vendored htmx to `version 2.0.6 <https://github.com/bigskysoftware/htmx/blob/master/CHANGELOG.md#206---2025-06-27>`__.

1.23.1 (2025-06-21)
-------------------

* Upgrade the vendored htmx to `version 2.0.5 <https://github.com/bigskysoftware/htmx/blob/master/CHANGELOG.md#205---2025-06-20>`__.

1.23.0 (2025-03-14)
-------------------

* Vendor htmx.

  You can now render an htmx script tag in your templates with:

  .. code-block:: django

      {% load django_htmx %}
      {% htmx_script %}

  No need to include htmx in your project separately.

  See :doc:`template_tags` for more information.

1.22.0 (2025-02-06)
-------------------

* Support Django 5.2.

1.21.0 (2024-10-27)
-------------------

* Drop Django 3.2 to 4.1 support.

1.20.0 (2024-10-25)
-------------------

* Drop Python 3.8 support.

* Support Python 3.13.

* Updated :ref:`the partial rendering tip <partial-rendering>` to cover using django-template-partials.

  Thanks to Carlton Gibson in `PR #413 <https://github.com/adamchainz/django-htmx/pull/413>`__.

1.19.0 (2024-08-05)
-------------------

* Add :func:`django_htmx.http.replace_url` for setting the ``HX-Replace-URL`` header.

  Thanks to Bogumil Schube in `PR #396 <https://github.com/adamchainz/django-htmx/pull/396>`__.

* Add ``select`` parameter to :class:`.HttpResponseLocation`.

  Thanks to Nikola Anović in `PR #462 <https://github.com/adamchainz/django-htmx/pull/462>`__.

* Add documentation notes under :class:`.HtmxMiddleware`, covering setting the ``Vary`` header for caching and type hinting ``request.htmx``.

1.18.0 (2024-06-19)
-------------------

* Support Django 5.1.

1.17.3 (2024-03-01)
-------------------

* Change ``reswap()`` type hint for ``method`` to ``str``.

  Thanks to Dan Jacob for the report in `Issue #421 <https://github.com/adamchainz/django-htmx/issues/421>`__ and fix in `PR #422 <https://github.com/adamchainz/django-htmx/pull/422>`__.

1.17.2 (2023-11-16)
-------------------

* Fix asgiref dependency declaration.

1.17.1 (2023-11-14)
-------------------

* Fix ASGI compatibility on Python 3.12.

  Thanks to Grigory Vydrin for the report in `Issue #381 <https://github.com/adamchainz/django-htmx/issues/381>`__.

1.17.0 (2023-10-11)
-------------------

* Support Django 5.0.

1.16.0 (2023-07-10)
-------------------

* Drop Python 3.7 support.

* Remove the unnecessary ``type`` attribute on the ``<script>`` tag generated by ``django_htmx_script``.

* Allow custom JSON encoders in ``trigger_client_event()``.

  Thanks to Joey Lange in `PR #349 <https://github.com/adamchainz/django-htmx/pull/349>`__.

1.15.0 (2023-06-13)
-------------------

* Support Python 3.12.

1.14.0 (2023-02-25)
-------------------

* Support Django 4.2.

1.13.0 (2022-11-10)
-------------------

* Make the ``params`` argument of :func:`.trigger_client_event` optional.

  Thanks to Chris Tapper in `PR #263 <https://github.com/adamchainz/django-htmx/pull/263>`__.

* Add :func:`django_htmx.http.push_url` for setting the ``HX-Push-URL`` header.

  Thanks to Chris Tapper in `PR #264 <https://github.com/adamchainz/django-htmx/pull/264>`__.

* Add :func:`django_htmx.http.reswap` for setting the ``HX-Reswap`` header added in `htmx 1.8.0 <https://htmx.org/posts/2022-07-12-htmx-1.8.0-is-released/>`__.

* Add :func:`django_htmx.http.retarget` for setting the ``HX-Retarget`` header added in `htmx 1.6.1 <https://htmx.org/posts/2021-11-22-htmx-1.6.1-is-released/>`__.

* Add :class:`.HttpResponseLocation` for sending a response with the ``HX-Location`` header.

  Thanks to Ben Beecher in `PR #239 <https://github.com/adamchainz/django-htmx/pull/239>`__.

* Add :attr:`request.htmx.current_url_abs_path <.current_url_abs_path>`, the absolute-path form of ``request.current_url``.

  Thanks to Trey Hunner for the feature request in `Issue #259 <https://github.com/adamchainz/django-htmx/issues/259>`__.

1.12.2 (2022-08-31)
-------------------

* Improve type hints for ``trigger_client_event()`` by using a ``TypeVar``.

  Thanks to Chris Tapper in `PR #260 <https://github.com/adamchainz/django-htmx/pull/260>`__.

1.12.1 (2022-07-29)
-------------------

* Override ``HttpResponseClientRedirect.url`` property to fix ``HttpResponseClientRedirect.__repr__``.

1.12.0 (2022-06-05)
-------------------

* Support Python 3.11.

* Support Django 4.1.

1.11.0 (2022-05-10)
-------------------

* Drop support for Django 2.2, 3.0, and 3.1.

1.10.0 (2022-05-07)
-------------------

* Make ``trigger_client_event()`` return the response.

* Add async support to ``HtmxMiddleware`` to reduce overhead on async views.

1.9.0 (2022-03-02)
------------------

* Move documentation from the README to `Read the Docs <https://django-htmx.readthedocs.io/>`__.
  Also expand it with sections on installing htmx, and configuring CSRF.

  Thanks to Ben Beecher for initial setup in `PR #194 <https://github.com/adamchainz/django-htmx/pull/194>`__.

* Add ``HttpResponseClientRefresh`` for telling htmx to reload the page.

  Thanks to Bogumil Schube in `PR #193 <https://github.com/adamchainz/django-htmx/pull/193>`__.

1.8.0 (2022-01-10)
------------------

* Drop Python 3.6 support.

1.7.0 (2022-01-10)
------------------

* Use ``DjangoJSONEncoder`` for encoding the ``HX-Trigger`` event.

  Thanks to Cleiton de Lima in `PR #182 <https://github.com/adamchainz/django-htmx/pull/182>`__.

* Drop redundant 'async' from debug ``<script>`` tag.

1.6.0 (2021-10-06)
------------------

* Add ``HttpResponseClientRedirect`` class for sending HTMX client-side redirects.

  Thanks to Julio César in `PR #121 <https://github.com/adamchainz/django-htmx/pull/121>`__.

* Add ``django_htmx.http.trigger_client_event()`` for triggering client side events.

1.5.0 (2021-10-05)
------------------

* Support Python 3.10.

1.4.0 (2021-10-02)
------------------

* Support the ``HX-Boosted`` header, which was added in htmx 1.6.0.
  This is parsed into the ``request.htmx.boosted`` attribute.

1.3.0 (2021-09-28)
------------------

* Support Django 4.0.

1.2.1 (2021-07-09)
------------------

* Make extension script error handler also show 404 errors.

1.2.0 (2021-07-08)
------------------

* Installation now requires adding ``"django_htmx"`` to your ``INSTALLED_APPS`` setting.

* Add extension script with debug error handler.
  To install it, follow the new instructions in the README.

  htmx’s default behaviour is to discard error responses.
  The extension overrides this in debug mode to shows Django’s debug error responses.

* Add ``django_htmx.http`` module with ``HttpResponseStopPolling`` class and ``HTMX_STOP_POLLING`` constant.

1.1.0 (2021-06-03)
------------------

* Support the ``HX-History-Restore-Request`` header, which was added in htmx 1.2.0.
  This is parsed into the ``request.htmx.history_restore_request`` attribute.

* Support the ``Triggering-Event`` header, which is sent by the `event-header extension <https://github.com/bigskysoftware/htmx-extensions/blob/main/src/event-header/README.md>`__.
  This is parsed into the ``request.htmx.triggering_event`` attribute.

* Stop distributing tests to reduce package size.
  Tests are not intended to be run outside of the tox setup in the repository.
  Repackagers can use GitHub's tarballs per tag.

1.0.1 (2021-02-08)
------------------

* Remove ``X-HTTP-Method-Override`` handling from ``HtmxMiddleware``.
  This has not been needed since htmx 0.0.5, when use of the header was extracted to its ``method-override`` extension in `htmx commit 2305ae <https://github.com/bigskysoftware/htmx/commit/2305aed18e925da55f15dc5798db37ac0142f2b4>`__.

1.0.0 (2021-02-07)
------------------

* Add ``HtmxMiddleware`` which handles request headers from htmx.

* Add example app on GitHub repository which demonstrates using django-htmx features.

* Remove the ``{% htmx_script %}`` template tag.
  Include htmx on your pages yourself - this allows you to better customize the way htmx is installed to suit your project - for example by using the ``async`` script attribute or by bundling it with extensions.

* Remove the ``HTMXViewMixin``, ``{% htmx_include %}`` and ``{% htmx_attrs %}`` tags.
  Partial rendering can be done more with a simpler technique - see the demo page in the example app, added in `Pull Request #30 <https://github.com/adamchainz/django-htmx/pull/30>`__.

0.1.4 (2020-06-30)
------------------

* This version and those before explored what's possible with htmx and django, but were not documented.