django-htmx-tools


Namedjango-htmx-tools JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryAn assortment of Django mixins and middleware for working with HTMX
upload_time2025-10-08 09:34:22
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords django htmx
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-htmx-tools

[![PyPI version](https://badge.fury.io/py/django-htmx-tools.svg)](https://badge.fury.io/py/django-htmx-tools)
[![Python versions](https://img.shields.io/pypi/pyversions/django-htmx-tools.svg)](https://pypi.org/project/django-htmx-tools/)
[![Django versions](https://img.shields.io/pypi/djversions/django-htmx-tools.svg)](https://pypi.org/project/django-htmx-tools/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Documentation Status](https://readthedocs.org/projects/django-htmx-tools/badge/?version=latest)](https://django-htmx-tools.readthedocs.io/en/latest/?badge=latest)

An assortment of Django mixins and middleware for working with HTMX.

django-htmx-tools provides a collection of utilities to make it easier to build
HTMX-powered Django applications. It includes middleware for proper caching and
authentication handling, as well as mixins and decorators for protecting views.

## Features

- **IsHtmxRequestMixin** - Class-based view mixin for HTMX-only endpoints
- **htmx_only_request** - Function decorator for HTMX-only views
- **is_htmx** - Utility function to check if a request is from HTMX
- **htmx_vary_middleware** - Proper caching headers for HTMX requests
- **htmx_auth_middleware** - Authentication redirect handling for HTMX

## References

- [HTMX Caching](https://htmx.org/docs/#caching)
- [How to Handle Django Login Redirects with HTMX](https://www.caktusgroup.com/blog/2022/11/11/how-handle-django-login-redirects-htmx/)

## Documentation

Please visit [https://django-htmx-tools.readthedocs.io](https://django-htmx-tools.readthedocs.io)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-htmx-tools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "django, htmx",
    "author": null,
    "author_email": "Howie Weiner <hello@builtbyhowie.co.uk>",
    "download_url": "https://files.pythonhosted.org/packages/f3/33/79d0415397dc535cddcbf6eb1ae6b059eb0ce76991a9569e0cc88b56933e/django_htmx_tools-1.0.1.tar.gz",
    "platform": null,
    "description": "# django-htmx-tools\n\n[![PyPI version](https://badge.fury.io/py/django-htmx-tools.svg)](https://badge.fury.io/py/django-htmx-tools)\n[![Python versions](https://img.shields.io/pypi/pyversions/django-htmx-tools.svg)](https://pypi.org/project/django-htmx-tools/)\n[![Django versions](https://img.shields.io/pypi/djversions/django-htmx-tools.svg)](https://pypi.org/project/django-htmx-tools/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Documentation Status](https://readthedocs.org/projects/django-htmx-tools/badge/?version=latest)](https://django-htmx-tools.readthedocs.io/en/latest/?badge=latest)\n\nAn assortment of Django mixins and middleware for working with HTMX.\n\ndjango-htmx-tools provides a collection of utilities to make it easier to build\nHTMX-powered Django applications. It includes middleware for proper caching and\nauthentication handling, as well as mixins and decorators for protecting views.\n\n## Features\n\n- **IsHtmxRequestMixin** - Class-based view mixin for HTMX-only endpoints\n- **htmx_only_request** - Function decorator for HTMX-only views\n- **is_htmx** - Utility function to check if a request is from HTMX\n- **htmx_vary_middleware** - Proper caching headers for HTMX requests\n- **htmx_auth_middleware** - Authentication redirect handling for HTMX\n\n## References\n\n- [HTMX Caching](https://htmx.org/docs/#caching)\n- [How to Handle Django Login Redirects with HTMX](https://www.caktusgroup.com/blog/2022/11/11/how-handle-django-login-redirects-htmx/)\n\n## Documentation\n\nPlease visit [https://django-htmx-tools.readthedocs.io](https://django-htmx-tools.readthedocs.io)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "An assortment of Django mixins and middleware for working with HTMX",
    "version": "1.0.1",
    "project_urls": {
        "Documentation": "https://django-htmx-tools.readthedocs.io/",
        "Homepage": "https://github.com/howieweiner/django-htmx-tools",
        "Issues": "https://github.com/howieweiner/django-htmx-tools/issues",
        "Repository": "https://github.com/howieweiner/django-htmx-tools.git"
    },
    "split_keywords": [
        "django",
        " htmx"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f70e52c18fbeef6f3fb77dd16052dc17eea91f03f05048cc2e0fe4a3abb2d3d1",
                "md5": "19084ff67ab16b5a98580bca2ff53bd0",
                "sha256": "85668d55e24d90d557b1e5c22575552075b77e07ef5977f744f62a41bfa893e2"
            },
            "downloads": -1,
            "filename": "django_htmx_tools-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "19084ff67ab16b5a98580bca2ff53bd0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 6180,
            "upload_time": "2025-10-08T09:34:20",
            "upload_time_iso_8601": "2025-10-08T09:34:20.925590Z",
            "url": "https://files.pythonhosted.org/packages/f7/0e/52c18fbeef6f3fb77dd16052dc17eea91f03f05048cc2e0fe4a3abb2d3d1/django_htmx_tools-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f33379d0415397dc535cddcbf6eb1ae6b059eb0ce76991a9569e0cc88b56933e",
                "md5": "15a1cd2b364c08c8cf65947037bd6509",
                "sha256": "0d84dbb3b17cfd900b9be4ed0bdf2c2838576739209852156c57beb6cbf01f50"
            },
            "downloads": -1,
            "filename": "django_htmx_tools-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "15a1cd2b364c08c8cf65947037bd6509",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 8764,
            "upload_time": "2025-10-08T09:34:22",
            "upload_time_iso_8601": "2025-10-08T09:34:22.608313Z",
            "url": "https://files.pythonhosted.org/packages/f3/33/79d0415397dc535cddcbf6eb1ae6b059eb0ce76991a9569e0cc88b56933e/django_htmx_tools-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-08 09:34:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "howieweiner",
    "github_project": "django-htmx-tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "django-htmx-tools"
}
        
Elapsed time: 1.03135s