djhtmx 1.2.1__py3-none-any.whl → 1.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- djhtmx/__init__.py +1 -1
- djhtmx/static/htmx/django.js +0 -11
- djhtmx/urls.py +2 -1
- {djhtmx-1.2.1.dist-info → djhtmx-1.2.2.dist-info}/METADATA +1 -1
- {djhtmx-1.2.1.dist-info → djhtmx-1.2.2.dist-info}/RECORD +7 -7
- {djhtmx-1.2.1.dist-info → djhtmx-1.2.2.dist-info}/WHEEL +0 -0
- {djhtmx-1.2.1.dist-info → djhtmx-1.2.2.dist-info}/licenses/LICENSE +0 -0
djhtmx/__init__.py
CHANGED
djhtmx/static/htmx/django.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
(function () {
|
|
2
|
-
document.body.addEventListener("htmx:configRequest", (event) => {
|
|
3
|
-
const csrf_header = document
|
|
4
|
-
.querySelector("meta[name=django-csrf-header-name]")
|
|
5
|
-
.getAttribute("content");
|
|
6
|
-
const csrf_token = document
|
|
7
|
-
.querySelector("meta[name=django-csrf-token]")
|
|
8
|
-
.getAttribute("content");
|
|
9
|
-
|
|
10
|
-
event.detail.headers[csrf_header] = csrf_token;
|
|
11
|
-
});
|
|
12
|
-
|
|
13
2
|
// WebSocket Management
|
|
14
3
|
let sentComponents = new Set();
|
|
15
4
|
|
djhtmx/urls.py
CHANGED
|
@@ -8,6 +8,7 @@ from django.http.request import HttpRequest
|
|
|
8
8
|
from django.http.response import HttpResponse
|
|
9
9
|
from django.urls import path, re_path
|
|
10
10
|
from django.utils.html import format_html
|
|
11
|
+
from django.views.decorators.csrf import csrf_exempt
|
|
11
12
|
|
|
12
13
|
from .commands import PushURL, ReplaceURL, SendHtml
|
|
13
14
|
from .component import REGISTRY, Destroy, DispatchDOMEvent, Focus, Open, Redirect, Triggers
|
|
@@ -95,7 +96,7 @@ def app_name_of_component(cls: type):
|
|
|
95
96
|
urlpatterns = [
|
|
96
97
|
path(
|
|
97
98
|
f"{app_name_of_component(component)}/{component_name}/<component_id>/<event_handler>",
|
|
98
|
-
partial(endpoint, component_name=component_name),
|
|
99
|
+
csrf_exempt(partial(endpoint, component_name=component_name)),
|
|
99
100
|
name=f"djhtmx.{component_name}",
|
|
100
101
|
)
|
|
101
102
|
for component_name, component in REGISTRY.items()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
djhtmx/__init__.py,sha256=
|
|
1
|
+
djhtmx/__init__.py,sha256=l25O4H6NDgkxXNhFUfB5NRdVr6ewp4P6sM4cDCO4YXE,84
|
|
2
2
|
djhtmx/apps.py,sha256=hAyjzmInEstxLY9k8Qn58LvNlezgQLx5_NqyVL1WwYs,323
|
|
3
3
|
djhtmx/command_queue.py,sha256=kiYbQFPyjnhMSR7KgO1Nu-lWiapnH511P2Pyg-Zrdq4,4862
|
|
4
4
|
djhtmx/commands.py,sha256=UxXbARd4Teetjh_zjvAWgI2KNbvdETH-WrGf4qD9Xr8,1206
|
|
@@ -15,10 +15,10 @@ djhtmx/repo.py,sha256=KYYhZWomrKB512QBjjb2ThaUWbmq6SZsYvcrl3Z5nGY,22797
|
|
|
15
15
|
djhtmx/settings.py,sha256=ymFUMvrcXDkYU9KkhPOjRZSQMWz5GcUjlgh07x09-1s,1242
|
|
16
16
|
djhtmx/testing.py,sha256=AdZKsT6sNTsyqSKx6EmfthOIHzSAPkTquheMfg9znbk,8301
|
|
17
17
|
djhtmx/tracing.py,sha256=xkCXb7t_3yCj1PGzmQfHPu9sYQftDKwtALaEbFVnQ1E,1260
|
|
18
|
-
djhtmx/urls.py,sha256=
|
|
18
|
+
djhtmx/urls.py,sha256=7u3Oj5coQR3aDwE3_DlEc52EKIbN8AMXoM--Zcuet0I,3960
|
|
19
19
|
djhtmx/utils.py,sha256=BcCdJHe0AqkRT_Kj-XJT_sHCpOyXtumo9mQGN2WqHek,4646
|
|
20
20
|
djhtmx/management/commands/htmx.py,sha256=tEtiJn_Z6byOFzBNIzTbdluA4T5q21zFwGvJ7yt90bw,3642
|
|
21
|
-
djhtmx/static/htmx/django.js,sha256=
|
|
21
|
+
djhtmx/static/htmx/django.js,sha256=XQgOfcqpF0Jtl9AZlrQ_tEBrNBdBj0OQ8hMFv3dLpoQ,6677
|
|
22
22
|
djhtmx/static/htmx/2.0.4/htmx.amd.js,sha256=Hgmm_X5zw7ek0pjBaxhzH7OHx6Xfce5UYVa9ICWlWR0,165593
|
|
23
23
|
djhtmx/static/htmx/2.0.4/htmx.cjs.js,sha256=4P3vh1eGwULBCT7wsKQ2bu4HiNQ_Kmnv2fP1RQ6_QW8,165586
|
|
24
24
|
djhtmx/static/htmx/2.0.4/htmx.esm.d.ts,sha256=hV0FewMl4vWgZFCX_wIpSATGkXou7o1DXOLnVhvgvJI,7330
|
|
@@ -30,7 +30,7 @@ djhtmx/templates/htmx/headers.html,sha256=rBQTBt9rnlxE8lgxN4U7nvzQZNw4JZKS4flD1V
|
|
|
30
30
|
djhtmx/templates/htmx/lazy.html,sha256=LfAThtKmFj-lCUZ7JWF_sC1Y6XsIpEz8A3IgWASn-J8,52
|
|
31
31
|
djhtmx/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
djhtmx/templatetags/htmx.py,sha256=HlH7_B9lJoTDoIkYPeEE55OwpBTrrCesE70j1KcRC70,8063
|
|
33
|
-
djhtmx-1.2.
|
|
34
|
-
djhtmx-1.2.
|
|
35
|
-
djhtmx-1.2.
|
|
36
|
-
djhtmx-1.2.
|
|
33
|
+
djhtmx-1.2.2.dist-info/METADATA,sha256=b4XSwBq9PCYhdREgZbH49y7R3WhpoEr2LYroDp5FtAY,32245
|
|
34
|
+
djhtmx-1.2.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
35
|
+
djhtmx-1.2.2.dist-info/licenses/LICENSE,sha256=kCi_iSBUGsRZInQn96w7LXYzjiRjZ8FXl6vP--mFRPk,1085
|
|
36
|
+
djhtmx-1.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|