Django, HTMX and DaisyUI Components - Building a To-Do List App

BugBytes โ€ข November 17, 2023
Video Thumbnail

About

On this channel, we create tutorials and videos primarily about web development, data analytics and data science. We'll focus on implementations using primarily Python and JavaScript, occasionally diving into other languages. As the channel progresses, we will also touch on concepts such as DevOps, containerization, cloud computing (AWS) and machine learning/AI. If you can spare any change, please consider buying me a coffee to help keep me motivated to write tutorials, make videos and write blog posts! It would be greatly appreciated: https://ko-fi.com/bugbytes Blog: https://www.bugbytes.io/posts/ Github: https://github.com/bugbytes-io

Video Description

In this video, we'll build a to-do list app with Django, HTMX and DaisyUI. Starter Code: https://github.com/bugbytes-io/htmx-django-daisyui We'll walk through adding the model and form classes, as well as styling page elements with DaisyUI component classes. We'll then learn how to submit data using HTMX, and how to update the DOM in response to those requests, again with DaisyUI components responsible for the styles. We will see how to mark to-dos as completed, and how to remove them from the database and front-end (with help from custom HTMX events). ๐Ÿ“Œ ๐—–๐—ต๐—ฎ๐—ฝ๐˜๐—ฒ๐—ฟ๐˜€: 00:00 Intro 00:43 DaisyUI 02:12 Creating Todo Django model class 04:06 Fetching and Displaying Todos 06:57 Adding TailwindCSS & DaisyUI 10:12 Adding DaisyUI Table component 11:21 Create Todo form class 13:29 Improving form styles with django-widget-tweaks 16:42 Adding HTMX to project 20:49 Creating partial template with django-template-partials 29:05 Marking to-do complete with HTMX 33:54 Deleting Todo with HTMX โ˜•๏ธ ๐—•๐˜‚๐˜† ๐—บ๐—ฒ ๐—ฎ ๐—ฐ๐—ผ๐—ณ๐—ณ๐—ฒ๐—ฒ: To support the channel and encourage new videos, please consider buying me a coffee here: https://ko-fi.com/bugbytes โ–ถ๏ธ Full Playlist: https://www.youtube.com/playlist?list=PL-2EBeDYMIbRByZ8GXhcnQSuv2dog4JxY ๐—ฆ๐—ผ๐—ฐ๐—ถ๐—ฎ๐—น ๐— ๐—ฒ๐—ฑ๐—ถ๐—ฎ: ๐Ÿ“– Blog: https://bugbytes.io/posts/ ๐Ÿ‘พ Github: https://github.com/bugbytes-io/htmx-django-daisyui ๐Ÿฆ Twitter: https://twitter.com/bugbytesio ๐Ÿ“š ๐—™๐˜‚๐—ฟ๐˜๐—ต๐—ฒ๐—ฟ ๐—ฟ๐—ฒ๐—ฎ๐—ฑ๐—ถ๐—ป๐—ด ๐—ฎ๐—ป๐—ฑ ๐—ถ๐—ป๐—ณ๐—ผ๐—ฟ๐—บ๐—ฎ๐˜๐—ถ๐—ผ๐—ป: Starter Code: https://github.com/bugbytes-io/htmx-django-daisyui DaisyUI: https://daisyui.com/ DaisyUI Install: https://daisyui.com/docs/cdn/ DaisyUI Button: https://daisyui.com/components/button/ DaisyUI Table: https://daisyui.com/components/table/ django-widget-tweaks: https://pypi.org/project/django-widget-tweaks/ HTMX: https://htmx.org/docs/#installing Django-template-partials: https://github.com/carltongibson/django-template-partials Adding CSRF Token to HTMX Request: https://django-htmx.readthedocs.io/en/latest/tips.html #python #django #webdevelopment #htmx

You May Also Like

Boost Your Web Dev Setup

AI-recommended products based on this video

Loading...
Environet Hydroponic Growing Kit, Self-Watering Mason Jar Herb Garden Starter Kit Indoor, Windowsill Herb Garden, Grow Your Own Herbs from Organic Seeds (Basil)

Environet Hydroponic Growing Kit, Self-Watering Mason Jar Herb Garden Starter Kit Indoor, Windowsill Herb Garden, Grow Your Own Herbs from Organic Seeds (Basil)

(786)
$69.15$33.51
FREE delivery Jun 13 - 17
Loading...
Herb Garden Planter Indoor Kit 21Pcs Kitchen Herb Garden Starter Kit Growing Kit Including Wooden Box Burlap Pots Soil Discs Gardening Tools Unique Easter Birthday Christmas Gift Ideas for Women Mom

Herb Garden Planter Indoor Kit 21Pcs Kitchen Herb Garden Starter Kit Growing Kit Including Wooden Box Burlap Pots Soil Discs Gardening Tools Unique Easter Birthday Christmas Gift Ideas for Women Mom

(0)
$30.99
FREE delivery Jun 19 - Jul 3
Loading...
Bonsai Starter Kit โ€“ 1x Bonsai Tree | Complete Indoor Starter Kit for Growing Plants with Bonsai Seeds, Tools & Planters โ€“ Gardening Gifts for Women & Men
Best Seller

Bonsai Starter Kit โ€“ 1x Bonsai Tree | Complete Indoor Starter Kit for Growing Plants with Bonsai Seeds, Tools & Planters โ€“ Gardening Gifts for Women & Men

(243)
$19.99
FREE delivery Sat, Jun 14 on your first order
300+ bought in past month
Loading...
Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

(382)
$94.95
PrimeFREE delivery Sat, Jun 14
Loading...
MrBeast Lab Swarms Atomic Series Exclusive Cash Case Bulk Pack, Experiment by Adding Water, Shaking The Test Tube and Reveal 2 of The 18, MrBeast Themed Swarms Collectible Micro Beasts

MrBeast Lab Swarms Atomic Series Exclusive Cash Case Bulk Pack, Experiment by Adding Water, Shaking The Test Tube and Reveal 2 of The 18, MrBeast Themed Swarms Collectible Micro Beasts

(131)
$55.00
Loading...
VersionTECH. Gaming Mouse Ergonomic Wired Computer Mouse with 7 Colors LED Backlight, 4 DPI Settings Up to 3600 DPI Compatible for Chromebook Windows 7/8/10/11 XP/Mac/Linux Gamer/Notebook/MacBook
Best Seller

VersionTECH. Gaming Mouse Ergonomic Wired Computer Mouse with 7 Colors LED Backlight, 4 DPI Settings Up to 3600 DPI Compatible for Chromebook Windows 7/8/10/11 XP/Mac/Linux Gamer/Notebook/MacBook

(15,947)
$12.79
FREE delivery Thu, Sep 11 on your first order
500+ bought in past month
Loading...
LODVIE Wireless Mouse for Laptop,2400 DPI Wireless Computer Mouse with 6 Buttons,2.4G Ergonomic USB Cordless Mouse,15 Months Battery Life Mouse for Laptop PC Mac Computer Chromebook MacBook-Black

LODVIE Wireless Mouse for Laptop,2400 DPI Wireless Computer Mouse with 6 Buttons,2.4G Ergonomic USB Cordless Mouse,15 Months Battery Life Mouse for Laptop PC Mac Computer Chromebook MacBook-Black

(7,870)
$14.99
Prime
2K+ bought in past month
Loading...
Monster N-Lite 211 Wireless Earbuds๏ผŒ Bluetooth 6.0 Stereo Headphones with Noise-Cancelling Mic and LED Display, Built-in Mic for Clear Calls, Waterproof Design for Sports

Monster N-Lite 211 Wireless Earbuds๏ผŒ Bluetooth 6.0 Stereo Headphones with Noise-Cancelling Mic and LED Display, Built-in Mic for Clear Calls, Waterproof Design for Sports

(8)
$39.99
FREE delivery Tue, Nov 4
Loading...
Monster N-Lite 211 Wireless Earbuds, Bluetooth 6.0 Stereo Headphones with Powerful Bass, Built-in Noise-Cancelling Mic for Clear Calls, LED Display, 36H Playtime, IPX5 Waterproof Design for Sports

Monster N-Lite 211 Wireless Earbuds, Bluetooth 6.0 Stereo Headphones with Powerful Bass, Built-in Noise-Cancelling Mic for Clear Calls, LED Display, 36H Playtime, IPX5 Waterproof Design for Sports

(40)
$39.99
FREE delivery Thu, Nov 13
Loading...
AOC 2025 Laptop, Laptop Computer with Processor 12th Alder Lake N97(Up to 3.6GHz) 16GB RAM 512GB SSD 15.6 Inch FHD Screen Premium Laptop Windows 11 Pro, Metal Shell, Type-C, WiFi, Bluetooth

AOC 2025 Laptop, Laptop Computer with Processor 12th Alder Lake N97(Up to 3.6GHz) 16GB RAM 512GB SSD 15.6 Inch FHD Screen Premium Laptop Windows 11 Pro, Metal Shell, Type-C, WiFi, Bluetooth

(201)
$459.99
FREE delivery Tue, Jun 17
50+ bought in past month
Loading...
TREE.NB M5Y1K HD4J0 14.8V 40Wh Battery Compatible for Dell Laptop Battery for 3558 3451 3551 5551 5555 5558 5758 Vostro 3451 GXVJ3 07G07 6YFVW K185W Premium Cells

TREE.NB M5Y1K HD4J0 14.8V 40Wh Battery Compatible for Dell Laptop Battery for 3558 3451 3551 5551 5555 5558 5758 Vostro 3451 GXVJ3 07G07 6YFVW K185W Premium Cells

(1,115)
$29.66
Prime