Skip to main content

Django+HTMX integration with the messages framework

Project description

Django Htmx Messages

CI Status Documentation Status Test coverage percentage

uv Ruff pre-commit

PyPI Version Supported Python versions License


Documentation: https://django-htmx-messages.readthedocs.io

Source Code: https://github.com/abe-101/django-htmx-messages


Django+HTMX integration with the messages framework

A PyPI package for Benoit Blanchon's django-htmx-messages-framework (used with permission). It integrates Django's messages framework with HTMX for dynamic toast notifications.

Demo

Installation

Install this via pip (or your favourite package manager):

pip install django-htmx-messages

Add the app to your INSTALLED_APPS:

```python
INSTALLED_APPS = [
    "django_htmx_messages",
]

MIDDLEWARE = [
    "django_htmx_messages.middleware.HtmxMessageMiddleware",
]

Add to your base template:

<head>
  <script src="{% static 'htmx.min.js' %}" defer></script>
  <script src="{% static 'toasts.js' %}" defer></script>
</head>
<body>
  {# Your content here #} {% include 'toasts.html' %}
</body>

Try the Demo

git clone https://github.com/abe-101/django-htmx-messages.git
cd django-htmx-messages
uv sync
uv run manage.py runserver

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Abe Hanoka
Abe Hanoka

💻 🤔 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

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_messages-0.1.1.tar.gz (10.4 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_messages-0.1.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file django_htmx_messages-0.1.1.tar.gz.

File metadata

  • Download URL: django_htmx_messages-0.1.1.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for django_htmx_messages-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3358f79f2a6e173b7571750a511c8f64e419e5b697ea2e41841a834def6cea2c
MD5 62b856a3fd72d60c88e46ba95cfd6f90
BLAKE2b-256 cc21d249a5e04a1d4daf04a6dbb3d6834a08d6110455a09044a8f3ffd4dbf4b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_htmx_messages-0.1.1.tar.gz:

Publisher: ci.yml on abe-101/django-htmx-messages

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_messages-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_htmx_messages-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c8c1933821c0a339abe815df30166bc6363903c5007ad9acc945944b4bbcbc70
MD5 f72051f5f9db17eacfb14a1b70d54c7a
BLAKE2b-256 1ea289c90949f9f30d614a458998d0fc6cfff81a289bff33c05327f288d25533

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_htmx_messages-0.1.1-py3-none-any.whl:

Publisher: ci.yml on abe-101/django-htmx-messages

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