Skip to main content

An assortment of Django mixins and middleware for working with HTMX

Project description

django-htmx-tools

PyPI version Python versions Django versions License: MIT Documentation Status

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

Documentation

Please visit https://django-htmx-tools.readthedocs.io

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_htmx_tools-1.0.2.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_htmx_tools-1.0.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file django_htmx_tools-1.0.2.tar.gz.

File metadata

  • Download URL: django_htmx_tools-1.0.2.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_htmx_tools-1.0.2.tar.gz
Algorithm Hash digest
SHA256 888c49ad5bc40b945d14c7b64c263cb88f2043ede5de9ce13b1362adc36b7819
MD5 2449765500db5062520e058118f853eb
BLAKE2b-256 297711ebacef5df796e74ed2f460d38191921095073bc78c8eaad969ddb3dd2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_htmx_tools-1.0.2.tar.gz:

Publisher: publish.yml on howieweiner/django-htmx-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_htmx_tools-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_htmx_tools-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c6c993b71c1e4dd0ff421476d6b3e09406227f5e23b877ec1cb641eb5b787dab
MD5 52be61f71315ed3202f0a7cd81bd8e54
BLAKE2b-256 af72bf91095425d14a34baed5bc34cd7acfe6a0076bd771c64f975335586f2da

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_htmx_tools-1.0.2-py3-none-any.whl:

Publisher: publish.yml on howieweiner/django-htmx-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page