djhtmx 1.0.0__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.
- djhtmx-1.0.0/.gitignore +15 -0
- djhtmx-1.0.0/CHANGELOG.md +22 -0
- djhtmx-1.0.0/LICENSE +22 -0
- djhtmx-1.0.0/MANIFEST.in +19 -0
- djhtmx-1.0.0/PKG-INFO +879 -0
- djhtmx-1.0.0/README.md +832 -0
- djhtmx-1.0.0/pyproject.toml +246 -0
- djhtmx-1.0.0/src/djhtmx/__init__.py +4 -0
- djhtmx-1.0.0/src/djhtmx/apps.py +11 -0
- djhtmx-1.0.0/src/djhtmx/command_queue.py +142 -0
- djhtmx-1.0.0/src/djhtmx/commands.py +49 -0
- djhtmx-1.0.0/src/djhtmx/component.py +511 -0
- djhtmx-1.0.0/src/djhtmx/consumer.py +84 -0
- djhtmx-1.0.0/src/djhtmx/context.py +7 -0
- djhtmx-1.0.0/src/djhtmx/exceptions.py +2 -0
- djhtmx-1.0.0/src/djhtmx/global_events.py +14 -0
- djhtmx-1.0.0/src/djhtmx/introspection.py +427 -0
- djhtmx-1.0.0/src/djhtmx/json.py +56 -0
- djhtmx-1.0.0/src/djhtmx/management/commands/htmx.py +71 -0
- djhtmx-1.0.0/src/djhtmx/middleware.py +36 -0
- djhtmx-1.0.0/src/djhtmx/query.py +177 -0
- djhtmx-1.0.0/src/djhtmx/repo.py +596 -0
- djhtmx-1.0.0/src/djhtmx/settings.py +47 -0
- djhtmx-1.0.0/src/djhtmx/static/htmx/2.0.4/ext/ws.js +467 -0
- djhtmx-1.0.0/src/djhtmx/static/htmx/2.0.4/htmx.amd.js +5264 -0
- djhtmx-1.0.0/src/djhtmx/static/htmx/2.0.4/htmx.cjs.js +5262 -0
- djhtmx-1.0.0/src/djhtmx/static/htmx/2.0.4/htmx.esm.d.ts +206 -0
- djhtmx-1.0.0/src/djhtmx/static/htmx/2.0.4/htmx.esm.js +5262 -0
- djhtmx-1.0.0/src/djhtmx/static/htmx/2.0.4/htmx.js +5261 -0
- djhtmx-1.0.0/src/djhtmx/static/htmx/2.0.4/htmx.min.js +1 -0
- djhtmx-1.0.0/src/djhtmx/static/htmx/django.js +209 -0
- djhtmx-1.0.0/src/djhtmx/templates/htmx/headers.html +9 -0
- djhtmx-1.0.0/src/djhtmx/templates/htmx/lazy.html +3 -0
- djhtmx-1.0.0/src/djhtmx/templatetags/__init__.py +0 -0
- djhtmx-1.0.0/src/djhtmx/templatetags/htmx.py +289 -0
- djhtmx-1.0.0/src/djhtmx/testing.py +194 -0
- djhtmx-1.0.0/src/djhtmx/tracing.py +52 -0
- djhtmx-1.0.0/src/djhtmx/urls.py +107 -0
- djhtmx-1.0.0/src/djhtmx/utils.py +117 -0
djhtmx-1.0.0/.gitignore
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Custom Context Support for Render Command**: The `Render` command now accepts an optional `context` parameter of type `dict[str, Any]`. When provided, this context will override the component's default context during template rendering, while preserving essential HTMX variables (`htmx_repo`, `hx_oob`, `this`). This enables more flexible template rendering scenarios where you need to pass custom data that differs from the component's state.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- The `Render` dataclass now includes a `context: dict[str, Any] | None = None` field
|
|
15
|
+
- The `Repository.render_html` method signature now includes an optional `context` parameter
|
|
16
|
+
- Template rendering logic now supports context override while maintaining backwards compatibility
|
|
17
|
+
|
|
18
|
+
### Technical Details
|
|
19
|
+
- All changes are fully backwards compatible - existing code continues to work without modification
|
|
20
|
+
- When `context=None` (default), behavior is identical to previous versions
|
|
21
|
+
- When `context` is provided, it takes precedence over component context but essential HTMX context variables are preserved
|
|
22
|
+
- Comprehensive test coverage added for the new functionality
|
djhtmx-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
MIT License
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2021 Eddy Ernesto del Valle Pino
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
djhtmx-1.0.0/MANIFEST.in
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Include package metadata and documentation
|
|
2
|
+
include README.md
|
|
3
|
+
include CHANGELOG.md
|
|
4
|
+
include LICENSE
|
|
5
|
+
include pyproject.toml
|
|
6
|
+
|
|
7
|
+
# Include package code with templates and static files
|
|
8
|
+
recursive-include src/djhtmx *.py
|
|
9
|
+
recursive-include src/djhtmx *.html *.js
|
|
10
|
+
|
|
11
|
+
# Exclude development and build artifacts
|
|
12
|
+
exclude tests
|
|
13
|
+
prune src/tests
|
|
14
|
+
global-exclude *.pyc
|
|
15
|
+
global-exclude *.pyo
|
|
16
|
+
global-exclude *.pyd
|
|
17
|
+
global-exclude __pycache__
|
|
18
|
+
global-exclude *.egg-info
|
|
19
|
+
global-exclude .DS_Store
|