djhtmx 1.2.3__py3-none-any.whl → 1.2.5__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/command_queue.py +4 -4
- djhtmx/templatetags/htmx.py +1 -5
- djhtmx/urls.py +1 -1
- {djhtmx-1.2.3.dist-info → djhtmx-1.2.5.dist-info}/METADATA +1 -1
- {djhtmx-1.2.3.dist-info → djhtmx-1.2.5.dist-info}/RECORD +8 -8
- {djhtmx-1.2.3.dist-info → djhtmx-1.2.5.dist-info}/WHEEL +1 -1
- {djhtmx-1.2.3.dist-info → djhtmx-1.2.5.dist-info}/licenses/LICENSE +0 -0
djhtmx/__init__.py
CHANGED
djhtmx/command_queue.py
CHANGED
|
@@ -124,12 +124,12 @@ class CommandQueue:
|
|
|
124
124
|
match command:
|
|
125
125
|
case Execute():
|
|
126
126
|
return 0, "", 0
|
|
127
|
+
case Destroy(component_id):
|
|
128
|
+
return 1, component_id, 0
|
|
127
129
|
case Signal(_, timestamp):
|
|
128
|
-
return 1, "", timestamp
|
|
129
|
-
case Emit(_, timestamp):
|
|
130
130
|
return 2, "", timestamp
|
|
131
|
-
case
|
|
132
|
-
return 3, "",
|
|
131
|
+
case Emit(_, timestamp):
|
|
132
|
+
return 3, "", timestamp
|
|
133
133
|
case SkipRender():
|
|
134
134
|
return 4, "", 0
|
|
135
135
|
case BuildAndRender(_, _, _, _, timestamp):
|
djhtmx/templatetags/htmx.py
CHANGED
|
@@ -138,11 +138,7 @@ def hx_tag(context: Context):
|
|
|
138
138
|
def oob(context: Context, suffix: str):
|
|
139
139
|
oob = context.get("hx_oob")
|
|
140
140
|
context["hx_oob"] = False
|
|
141
|
-
if (component := context.get("this"))
|
|
142
|
-
component_id = component.id
|
|
143
|
-
else:
|
|
144
|
-
component_id = None
|
|
145
|
-
|
|
141
|
+
component_id = component.id if (component := context.get("this")) else None
|
|
146
142
|
id = "-".join(filter(None, (component_id, suffix)))
|
|
147
143
|
return format_html_attrs({"id": id, "hx-swap-oob": "true" if oob else None})
|
|
148
144
|
|
djhtmx/urls.py
CHANGED
|
@@ -45,7 +45,7 @@ def endpoint(request: HttpRequest, component_name: str, component_id: str, event
|
|
|
45
45
|
case Destroy(component_id):
|
|
46
46
|
content.append(
|
|
47
47
|
format_html(
|
|
48
|
-
'<div hx-swap-oob="
|
|
48
|
+
'<div id="{component_id}" hx-swap-oob="delete"></div>',
|
|
49
49
|
component_id=component_id,
|
|
50
50
|
)
|
|
51
51
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
djhtmx/__init__.py,sha256=
|
|
1
|
+
djhtmx/__init__.py,sha256=axowsZL4f1WUWWSzThnoHPgGU_5zjTeUeecZxzipkxc,84
|
|
2
2
|
djhtmx/apps.py,sha256=hAyjzmInEstxLY9k8Qn58LvNlezgQLx5_NqyVL1WwYs,323
|
|
3
|
-
djhtmx/command_queue.py,sha256=
|
|
3
|
+
djhtmx/command_queue.py,sha256=n1TERk9RmVT4dycmCroAOMLx_KXJ-HiqIA3qs_ptG7U,4884
|
|
4
4
|
djhtmx/commands.py,sha256=UxXbARd4Teetjh_zjvAWgI2KNbvdETH-WrGf4qD9Xr8,1206
|
|
5
5
|
djhtmx/component.py,sha256=0Z5gAbhOg7lKXzbwDGmVJVv_IA6WYtzrWxZo_ww9CpY,15789
|
|
6
6
|
djhtmx/consumer.py,sha256=kHNoXokcWaFjs5zbZAhM7Y0x7GVwwawXbxBCkP8HNA8,2839
|
|
@@ -15,7 +15,7 @@ djhtmx/repo.py,sha256=SpJK6KpxK9MraN29RvShaFt3ksifBAkv_gHUrxVkzIQ,22374
|
|
|
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=29BMD7fm05VFXtge3fRNDZuM5v_GziDm09n88aVp2fc,3961
|
|
19
19
|
djhtmx/utils.py,sha256=BcCdJHe0AqkRT_Kj-XJT_sHCpOyXtumo9mQGN2WqHek,4646
|
|
20
20
|
djhtmx/management/commands/htmx.py,sha256=tEtiJn_Z6byOFzBNIzTbdluA4T5q21zFwGvJ7yt90bw,3642
|
|
21
21
|
djhtmx/static/htmx/django.js,sha256=XQgOfcqpF0Jtl9AZlrQ_tEBrNBdBj0OQ8hMFv3dLpoQ,6677
|
|
@@ -29,8 +29,8 @@ djhtmx/static/htmx/2.0.4/ext/ws.js,sha256=HwUYFqEZBvs7Tx0_O0Bi-Dcmg5UOMlbMdkJ2FW
|
|
|
29
29
|
djhtmx/templates/htmx/headers.html,sha256=z7r9klwBDXDyjbHrzatZeHDvXB2DaZhgu55CFbbD3d4,159
|
|
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
|
-
djhtmx/templatetags/htmx.py,sha256=
|
|
33
|
-
djhtmx-1.2.
|
|
34
|
-
djhtmx-1.2.
|
|
35
|
-
djhtmx-1.2.
|
|
36
|
-
djhtmx-1.2.
|
|
32
|
+
djhtmx/templatetags/htmx.py,sha256=zsbLYLBVE8zxoA-peiuKwJQCNnphI6zM9TSCbAdtnKw,8138
|
|
33
|
+
djhtmx-1.2.5.dist-info/METADATA,sha256=AGqv4F4s0UAI9FqI9tp4Bpp14XPIOCfvpMn1LrYKxy4,32245
|
|
34
|
+
djhtmx-1.2.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
35
|
+
djhtmx-1.2.5.dist-info/licenses/LICENSE,sha256=kCi_iSBUGsRZInQn96w7LXYzjiRjZ8FXl6vP--mFRPk,1085
|
|
36
|
+
djhtmx-1.2.5.dist-info/RECORD,,
|
|
File without changes
|