djhtmx 1.1.0__py3-none-any.whl → 1.1.1__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/utils.py +1 -4
- {djhtmx-1.1.0.dist-info → djhtmx-1.1.1.dist-info}/METADATA +36 -3
- {djhtmx-1.1.0.dist-info → djhtmx-1.1.1.dist-info}/RECORD +6 -6
- {djhtmx-1.1.0.dist-info → djhtmx-1.1.1.dist-info}/WHEEL +0 -0
- {djhtmx-1.1.0.dist-info → djhtmx-1.1.1.dist-info}/licenses/LICENSE +0 -0
djhtmx/__init__.py
CHANGED
djhtmx/utils.py
CHANGED
|
@@ -63,12 +63,9 @@ def get_instance_subscriptions(
|
|
|
63
63
|
return {f"{prefix}.{action}" for action in actions}
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
Action = t.Literal["created", "updated", "deleted"]
|
|
67
|
-
|
|
68
|
-
|
|
69
66
|
def get_model_subscriptions(
|
|
70
67
|
obj: type[models.Model] | models.Model,
|
|
71
|
-
actions: t.Sequence[
|
|
68
|
+
actions: t.Sequence[str | None] = (),
|
|
72
69
|
) -> set[str]:
|
|
73
70
|
"""Get the subscriptions to actions of the model.
|
|
74
71
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: djhtmx
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.1
|
|
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
|
|
@@ -54,8 +54,19 @@ Interactive UI Components for Django using [htmx](https://htmx.org)
|
|
|
54
54
|
|
|
55
55
|
## Install
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
```bash
|
|
58
|
+
uv add djhtmx
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
or
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install djhtmx
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
# Configuration
|
|
68
|
+
|
|
69
|
+
Add `djhtmx` to your `INSTALLED_APPS`.
|
|
59
70
|
|
|
60
71
|
```python
|
|
61
72
|
INSTALLED_APPS = [
|
|
@@ -63,11 +74,33 @@ INSTALLED_APPS = [
|
|
|
63
74
|
"djhtmx",
|
|
64
75
|
...
|
|
65
76
|
]
|
|
77
|
+
```
|
|
66
78
|
|
|
79
|
+
Install the Middleware as the last one of the list
|
|
80
|
+
|
|
81
|
+
```python
|
|
67
82
|
MIDDLEWARE = [
|
|
68
83
|
...,
|
|
69
84
|
"djhtmx.middleware",
|
|
70
85
|
]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Add `djhtmx.context.component_repo` to the list of context processors:
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
TEMPLATES = [
|
|
92
|
+
{
|
|
93
|
+
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
|
94
|
+
"DIRS": [],
|
|
95
|
+
"APP_DIRS": True,
|
|
96
|
+
"OPTIONS": {
|
|
97
|
+
"context_processors": [
|
|
98
|
+
...,
|
|
99
|
+
"djhtmx.context.component_repo",
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
]
|
|
71
104
|
|
|
72
105
|
```
|
|
73
106
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
djhtmx/__init__.py,sha256=
|
|
1
|
+
djhtmx/__init__.py,sha256=xrcVGamFk6KoJqtBJy3ACEWX66jWJTfebnCGNPZcAu8,84
|
|
2
2
|
djhtmx/apps.py,sha256=_Ic52zQLpbYmyuCAlgZ0lF3NDgi77sxptb31snBAN4o,268
|
|
3
3
|
djhtmx/command_queue.py,sha256=kiYbQFPyjnhMSR7KgO1Nu-lWiapnH511P2Pyg-Zrdq4,4862
|
|
4
4
|
djhtmx/commands.py,sha256=UxXbARd4Teetjh_zjvAWgI2KNbvdETH-WrGf4qD9Xr8,1206
|
|
@@ -16,7 +16,7 @@ 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
18
|
djhtmx/urls.py,sha256=zWMlw_udCUWvo5DNxsvbebSNRFxy0C9ghBmRg08XlcU,3894
|
|
19
|
-
djhtmx/utils.py,sha256=
|
|
19
|
+
djhtmx/utils.py,sha256=gjsJZrjrr7FDh-8wv9W5j3EWNlDl_Eztr5IeMvdY2BE,3617
|
|
20
20
|
djhtmx/management/commands/htmx.py,sha256=EtJhQofJ4Dl3s34Uihz4WbSljzy5R6r0HXGaX4vkcDg,2011
|
|
21
21
|
djhtmx/static/htmx/django.js,sha256=G59uwy5hA4QUcAFJv21SMxizATpNZG3KfgFlO2zXeGc,7086
|
|
22
22
|
djhtmx/static/htmx/2.0.4/htmx.amd.js,sha256=Hgmm_X5zw7ek0pjBaxhzH7OHx6Xfce5UYVa9ICWlWR0,165593
|
|
@@ -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.1.
|
|
34
|
-
djhtmx-1.1.
|
|
35
|
-
djhtmx-1.1.
|
|
36
|
-
djhtmx-1.1.
|
|
33
|
+
djhtmx-1.1.1.dist-info/METADATA,sha256=NMrxVSCGCi-0f4X5jWgClss_sMFM_M8vZ7Yx3mipc28,28777
|
|
34
|
+
djhtmx-1.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
35
|
+
djhtmx-1.1.1.dist-info/licenses/LICENSE,sha256=kCi_iSBUGsRZInQn96w7LXYzjiRjZ8FXl6vP--mFRPk,1085
|
|
36
|
+
djhtmx-1.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|