djhtmx 1.3.5__py3-none-any.whl → 1.3.6__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/templatetags/htmx.py +11 -1
- {djhtmx-1.3.5.dist-info → djhtmx-1.3.6.dist-info}/METADATA +1 -1
- {djhtmx-1.3.5.dist-info → djhtmx-1.3.6.dist-info}/RECORD +6 -6
- {djhtmx-1.3.5.dist-info → djhtmx-1.3.6.dist-info}/WHEEL +0 -0
- {djhtmx-1.3.5.dist-info → djhtmx-1.3.6.dist-info}/licenses/LICENSE +0 -0
djhtmx/__init__.py
CHANGED
djhtmx/templatetags/htmx.py
CHANGED
|
@@ -290,6 +290,16 @@ class ClassNode(Node):
|
|
|
290
290
|
class_names = [
|
|
291
291
|
class_name.resolve(cast(Mapping[str, Any], context))
|
|
292
292
|
for condition, class_name in self.condition_and_classes
|
|
293
|
-
if condition.eval(context) # type: ignore
|
|
293
|
+
if self._eval_bool(condition.eval(context)) # type: ignore
|
|
294
294
|
]
|
|
295
295
|
return format_html_attrs({"class": " ".join(filter(None, class_names)) or None})
|
|
296
|
+
|
|
297
|
+
@staticmethod
|
|
298
|
+
def _eval_bool(value) -> bool | str:
|
|
299
|
+
# Convert string boolean representations to actual booleans (yesno filter behavior)
|
|
300
|
+
if isinstance(value, str):
|
|
301
|
+
if value == "True":
|
|
302
|
+
return True
|
|
303
|
+
elif value in ("False", "None"):
|
|
304
|
+
return False
|
|
305
|
+
return value
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
djhtmx/__init__.py,sha256=
|
|
1
|
+
djhtmx/__init__.py,sha256=3PHFA44ypJPl5t6aEMzcNQcNGvvYIucrNLaKnVzTjEY,84
|
|
2
2
|
djhtmx/apps.py,sha256=hAyjzmInEstxLY9k8Qn58LvNlezgQLx5_NqyVL1WwYs,323
|
|
3
3
|
djhtmx/command_queue.py,sha256=LSUkb2YMRt1lDyOg6WP7PoHsObynec0B55JyFtcshT0,5090
|
|
4
4
|
djhtmx/commands.py,sha256=UxXbARd4Teetjh_zjvAWgI2KNbvdETH-WrGf4qD9Xr8,1206
|
|
@@ -30,8 +30,8 @@ djhtmx/static/htmx/2.0.4/ext/ws.js,sha256=HwUYFqEZBvs7Tx0_O0Bi-Dcmg5UOMlbMdkJ2FW
|
|
|
30
30
|
djhtmx/templates/htmx/headers.html,sha256=z7r9klwBDXDyjbHrzatZeHDvXB2DaZhgu55CFbbD3d4,159
|
|
31
31
|
djhtmx/templates/htmx/lazy.html,sha256=LfAThtKmFj-lCUZ7JWF_sC1Y6XsIpEz8A3IgWASn-J8,52
|
|
32
32
|
djhtmx/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
|
-
djhtmx/templatetags/htmx.py,sha256=
|
|
34
|
-
djhtmx-1.3.
|
|
35
|
-
djhtmx-1.3.
|
|
36
|
-
djhtmx-1.3.
|
|
37
|
-
djhtmx-1.3.
|
|
33
|
+
djhtmx/templatetags/htmx.py,sha256=TLYKgqk6fIBVdzLYpFWhCxv9hkFXJBfaXNeanvcVmOo,8770
|
|
34
|
+
djhtmx-1.3.6.dist-info/METADATA,sha256=-TXkF8F0DzaZmQ95x-Ka-I5AiMnR_leocT_hs76z_oc,33745
|
|
35
|
+
djhtmx-1.3.6.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
36
|
+
djhtmx-1.3.6.dist-info/licenses/LICENSE,sha256=kCi_iSBUGsRZInQn96w7LXYzjiRjZ8FXl6vP--mFRPk,1085
|
|
37
|
+
djhtmx-1.3.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|