djhtmx 1.2.9__py3-none-any.whl → 1.3.0__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 CHANGED
@@ -1,4 +1,4 @@
1
1
  from .middleware import middleware
2
2
 
3
- __version__ = "1.2.9"
3
+ __version__ = "1.3.0"
4
4
  __all__ = ("middleware",)
djhtmx/utils.py CHANGED
@@ -1,5 +1,5 @@
1
1
  import importlib
2
- import logging
2
+ import importlib.util
3
3
  import pkgutil
4
4
  import typing as t
5
5
  from urllib.parse import urlparse
@@ -131,11 +131,10 @@ def autodiscover_htmx_modules():
131
131
  """
132
132
  for app_config in apps.get_app_configs():
133
133
  module_name = f"{app_config.module.__name__}.htmx"
134
- try:
135
- module = importlib.import_module(module_name)
136
- except ImportError:
137
- logger.warning("Could not import %s", module_name)
134
+ spec = importlib.util.find_spec(module_name)
135
+ if spec is None:
138
136
  continue
137
+ module = importlib.import_module(module_name)
139
138
  if hasattr(module, "__path__"):
140
139
  # If it's a package, recursively walk it importing all modules and packages.
141
140
  for info in pkgutil.walk_packages(module.__path__, prefix=module_name + "."):
@@ -143,6 +142,3 @@ def autodiscover_htmx_modules():
143
142
  # `walk_packages` only imports packages, not modules; we need to import them
144
143
  # all.
145
144
  importlib.import_module(info.name)
146
-
147
-
148
- logger = logging.getLogger(__name__)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: djhtmx
3
- Version: 1.2.9
3
+ Version: 1.3.0
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
- djhtmx/__init__.py,sha256=Xo29y2KoMKHDn3Doa4sLhJWnPHI5uv_fhC_zm_8GBb4,84
1
+ djhtmx/__init__.py,sha256=ydHthne-W5gnbhYvHNryVOK740-7EmOWFeVGjQ_SgA4,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
@@ -16,7 +16,7 @@ djhtmx/settings.py,sha256=Iti4LkcKBTy-dNyCZxFH_cUp56aTcXjB5ftbssWyDnU,1318
16
16
  djhtmx/testing.py,sha256=QmZHrH6Up8uUxkVOHM6CyfocU774GL-lopJvM2X9Mkw,8369
17
17
  djhtmx/tracing.py,sha256=xkCXb7t_3yCj1PGzmQfHPu9sYQftDKwtALaEbFVnQ1E,1260
18
18
  djhtmx/urls.py,sha256=2LTzmBCd3lBlQcM6WrdQwkITxuL_4ArUHtiYbLk3T1M,4273
19
- djhtmx/utils.py,sha256=LCRdBqdvFjXC5l6pywMq3fm344_KQwt3Y2MW2-Nw3tM,4711
19
+ djhtmx/utils.py,sha256=PhFKUpDA6rS6kGkbkP3V0Md8-RQDEiARMoE6399KBy0,4649
20
20
  djhtmx/management/commands/htmx.py,sha256=tEtiJn_Z6byOFzBNIzTbdluA4T5q21zFwGvJ7yt90bw,3642
21
21
  djhtmx/static/htmx/django.js,sha256=QDgkUBiX9PBa_bqfK2k4NwjBAgZlxYEK-JklOgn_IR4,5453
22
22
  djhtmx/static/htmx/2.0.4/htmx.amd.js,sha256=Hgmm_X5zw7ek0pjBaxhzH7OHx6Xfce5UYVa9ICWlWR0,165593
@@ -31,7 +31,7 @@ djhtmx/templates/htmx/headers.html,sha256=z7r9klwBDXDyjbHrzatZeHDvXB2DaZhgu55CFb
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
33
  djhtmx/templatetags/htmx.py,sha256=-qFqz4T9mCJocG9XIIey81cCYwk07XUd_DMpxNdmbsM,8397
34
- djhtmx-1.2.9.dist-info/METADATA,sha256=0JFyGGexxkpISm-AWnAlvzbQ0-Ga0RHGaCnmpWjT_XQ,32245
35
- djhtmx-1.2.9.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
36
- djhtmx-1.2.9.dist-info/licenses/LICENSE,sha256=kCi_iSBUGsRZInQn96w7LXYzjiRjZ8FXl6vP--mFRPk,1085
37
- djhtmx-1.2.9.dist-info/RECORD,,
34
+ djhtmx-1.3.0.dist-info/METADATA,sha256=uLzOMfncYHYicOiym9dofXHEMDSYu8CdZD9vOQP-PxQ,32245
35
+ djhtmx-1.3.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
36
+ djhtmx-1.3.0.dist-info/licenses/LICENSE,sha256=kCi_iSBUGsRZInQn96w7LXYzjiRjZ8FXl6vP--mFRPk,1085
37
+ djhtmx-1.3.0.dist-info/RECORD,,
File without changes