https://github.com/pablolec/sb_django_htmx
HTMX / Django integration demo app
https://github.com/pablolec/sb_django_htmx
django django-application htmx htmx-app htmx-django python python3
Last synced: 2 months ago
JSON representation
HTMX / Django integration demo app
- Host: GitHub
- URL: https://github.com/pablolec/sb_django_htmx
- Owner: PabloLec
- License: gpl-3.0
- Created: 2023-12-09T11:40:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-15T23:26:57.000Z (about 2 years ago)
- Last Synced: 2025-10-04T08:59:57.082Z (9 months ago)
- Topics: django, django-application, htmx, htmx-app, htmx-django, python, python3
- Language: Python
- Homepage:
- Size: 3.46 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

## Overview
This project is a demonstration of integrating Django with HTMX to achieve partial page reloads for a dynamic and
responsive user experience. The primary goal is to explore the capabilities of HTMX in enhancing Django applications,
focusing on reducing full page reloads and increasing interactivity with minimal use of JavaScript.
## Project description
The application is a Django-based project utilizing a SQLite database, populated with a collection of books available
from the Project Gutenberg. The interface provides users with two interactive features:
1. **Book search**: Users can search for books by their titles. The search functionality is designed to be
case-insensitive and can match partial titles, allowing for flexible user queries.
2. **Book cover display**: Upon clicking on a search result, users can view a representation of the book's
cover. The cover is a simplified placeholder generated using the book's information.
No JavaScript was written for the behavior. The only two dependencies are therefore HTMX and Tailwind for a more
pleasant style.
## How to run
- `docker-compose up`
- Go to http://localhost:8000