Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacklinke/django-htmx-todo-list
Quick example of a todo list application using Django and HTMX
https://github.com/jacklinke/django-htmx-todo-list
Last synced: 11 days ago
JSON representation
Quick example of a todo list application using Django and HTMX
- Host: GitHub
- URL: https://github.com/jacklinke/django-htmx-todo-list
- Owner: jacklinke
- Created: 2021-04-24T01:27:21.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-22T20:26:11.000Z (over 2 years ago)
- Last Synced: 2024-05-19T19:26:05.057Z (6 months ago)
- Language: Python
- Size: 246 KB
- Stars: 74
- Watchers: 4
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-htmx - django-htmx-todo-list - Expands on django-htmx-todo to add task creation, editing, and deletion using FBVs. (Examples by Back-end / Python-based (Django, FastAPI, Flask))
README
# django-htmx-todo-list
Quick example of a todo list application using [Django](https://www.djangoproject.com/) and [HTMX](https://htmx.org/)
## Background
Modified & expanded from https://github.com/jaredlockhart/django-htmx-todo/
This project lets you build todo lists. It demonstrates functionality with django and HTMX, including use of modal forms, adding multiple forms to a list (an alternative to traditional django formsets), and deleting items from a list (or an entire list).
The original project used class-based Django views. That has been improved to use function-based views (see [Django Views — The Right Way](https://spookylukey.github.io/django-views-the-right-way/) to read why FBV is often the better approach!)
There are actually two example projects here which are the same in all respects except that `tasker` uses hard-coded html forms, and `tasker2` uses django forms with [django-crispy-forms](https://github.com/django-crispy-forms/django-crispy-forms) for formatting.
This project is very basic. It does not make use of authorization or other common important concerns. The focus is 100% on demonstrating some Django & HTMX concepts.
## Images
### Intitial Look at the app
![Intitial Look at the app](/images/0_initial_look.png)
### Adding a new TaskList
![Adding a new TaskList](/images/1_add_tasklist.png)
### The newly created TaskList
![The newly created TaskList](/images/2_new_tasklist.png)
### Adding Task instances
![Adding Task instances](/images/3_adding_tasks.png)
### Editing existing Task instances
![Editing existing Task instances](/images/4_editing_tasks.png)