djhtmx 1.2.4__tar.gz → 1.2.6__tar.gz

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.
Files changed (39) hide show
  1. {djhtmx-1.2.4 → djhtmx-1.2.6}/CHANGELOG.md +18 -0
  2. {djhtmx-1.2.4 → djhtmx-1.2.6}/PKG-INFO +1 -1
  3. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/__init__.py +1 -1
  4. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/component.py +4 -0
  5. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/settings.py +2 -0
  6. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/templatetags/htmx.py +1 -0
  7. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/urls.py +1 -1
  8. {djhtmx-1.2.4 → djhtmx-1.2.6}/.gitignore +0 -0
  9. {djhtmx-1.2.4 → djhtmx-1.2.6}/LICENSE +0 -0
  10. {djhtmx-1.2.4 → djhtmx-1.2.6}/MANIFEST.in +0 -0
  11. {djhtmx-1.2.4 → djhtmx-1.2.6}/README.md +0 -0
  12. {djhtmx-1.2.4 → djhtmx-1.2.6}/pyproject.toml +0 -0
  13. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/apps.py +0 -0
  14. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/command_queue.py +0 -0
  15. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/commands.py +0 -0
  16. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/consumer.py +0 -0
  17. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/context.py +0 -0
  18. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/exceptions.py +0 -0
  19. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/global_events.py +0 -0
  20. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/introspection.py +0 -0
  21. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/json.py +0 -0
  22. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/management/commands/htmx.py +0 -0
  23. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/middleware.py +0 -0
  24. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/query.py +0 -0
  25. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/repo.py +0 -0
  26. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/static/htmx/2.0.4/ext/ws.js +0 -0
  27. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/static/htmx/2.0.4/htmx.amd.js +0 -0
  28. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/static/htmx/2.0.4/htmx.cjs.js +0 -0
  29. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/static/htmx/2.0.4/htmx.esm.d.ts +0 -0
  30. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/static/htmx/2.0.4/htmx.esm.js +0 -0
  31. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/static/htmx/2.0.4/htmx.js +0 -0
  32. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/static/htmx/2.0.4/htmx.min.js +0 -0
  33. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/static/htmx/django.js +0 -0
  34. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/templates/htmx/headers.html +0 -0
  35. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/templates/htmx/lazy.html +0 -0
  36. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/templatetags/__init__.py +0 -0
  37. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/testing.py +0 -0
  38. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/tracing.py +0 -0
  39. {djhtmx-1.2.4 → djhtmx-1.2.6}/src/djhtmx/utils.py +0 -0
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.6] - 2025-12-24
11
+
12
+ ### Changed
13
+ - The `oob` template tag now automatically converts its suffix parameter to a string, allowing non-string values (integers, floats, etc.) to be passed directly
14
+
15
+ ## [1.2.5] - 2025-12-05
16
+
17
+ ### Fixed
18
+ - Fixed Destroy of component to use proper hx-swap-oob="delete" syntax
19
+
20
+ ## [1.2.4] - 2025-10-29
21
+
22
+ ### Fixed
23
+ - Prioritize Destroy commands to prevent stale component access - fixes race condition where signals would awaken components whose model instances were already deleted
24
+
25
+ ### Changed
26
+ - Code quality improvements (Ruff suggestions for ternary operators)
27
+
10
28
  ## [1.2.3] - 2025-10-09
11
29
 
12
30
  ### Fixed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: djhtmx
3
- Version: 1.2.4
3
+ Version: 1.2.6
4
4
  Summary: Interactive UI Components for Django using HTMX
5
5
  Project-URL: Homepage, https://github.com/edelvalle/djhtmx
6
6
  Project-URL: Documentation, https://github.com/edelvalle/djhtmx#readme
@@ -1,4 +1,4 @@
1
1
  from .middleware import middleware
2
2
 
3
- __version__ = "1.2.4"
3
+ __version__ = "1.2.6"
4
4
  __all__ = ("middleware",)
@@ -280,6 +280,10 @@ class HtmxComponent(BaseModel):
280
280
  if "[" in component_name and "]" in component_name:
281
281
  public = False
282
282
  elif _ABSTRACT_BASE_REGEX.match(component_name):
283
+ if settings.STRICT_PUBLIC_BASE:
284
+ raise TypeError(
285
+ f"HTMX Component: {FQN[cls]} Automatically detected as non public",
286
+ )
283
287
  logger.info(
284
288
  "HTMX Component: <%s> Automatically detected as non public",
285
289
  FQN[cls],
@@ -45,3 +45,5 @@ KEY_SIZE_SAMPLE_PROB = getattr(
45
45
  "DJHTMX_KEY_SIZE_SAMPLE_PROB",
46
46
  0.1,
47
47
  )
48
+
49
+ STRICT_PUBLIC_BASE = getattr(settings, "DJHTMX_STRICT_PUBLIC_BASE", False)
@@ -136,6 +136,7 @@ def hx_tag(context: Context):
136
136
 
137
137
  @register.simple_tag(takes_context=True)
138
138
  def oob(context: Context, suffix: str):
139
+ suffix = str(suffix)
139
140
  oob = context.get("hx_oob")
140
141
  context["hx_oob"] = False
141
142
  component_id = component.id if (component := context.get("this")) else None
@@ -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="outerHtml:#{component_id}"></div>',
48
+ '<div id="{component_id}" hx-swap-oob="delete"></div>',
49
49
  component_id=component_id,
50
50
  )
51
51
  )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes