https://github.com/abe-101/django-htmx-messages
Django+HTMX integration with the messages framework
https://github.com/abe-101/django-htmx-messages
bootstrap django django-messages htmx
Last synced: about 1 year ago
JSON representation
Django+HTMX integration with the messages framework
- Host: GitHub
- URL: https://github.com/abe-101/django-htmx-messages
- Owner: abe-101
- License: mit
- Created: 2025-01-02T20:08:52.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-03T04:55:17.000Z (over 1 year ago)
- Last Synced: 2025-04-12T10:47:53.299Z (about 1 year ago)
- Topics: bootstrap, django, django-messages, htmx
- Language: Python
- Homepage: https://django-htmx-messages.readthedocs.io/
- Size: 876 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Django Htmx Messages
---
**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](https://github.com/bblanchon/django-htmx-messages-framework/blob/oob) (used with permission). It integrates Django's messages framework with HTMX for dynamic toast notifications.
## Installation
Install this via pip (or your favourite package manager):
`pip install django-htmx-messages`
Add the app to your `INSTALLED_APPS`:
````python
```python
INSTALLED_APPS = [
"django_htmx_messages",
]
MIDDLEWARE = [
"django_htmx_messages.middleware.HtmxMessageMiddleware",
]
````
Add to your base template:
```html
{# Your content here #} {% include 'toasts.html' %}
```
## Try the Demo
```bash
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](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
## Credits
- Original implementation by [Benoit Blanchon](https://github.com/bblanchon/django-htmx-messages-framework/blob/oob)
This package was created with
[Copier](https://copier.readthedocs.io/) and the
[browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template)
project template.