The Definitive Guide to Hotwire and Django (2.0.0)
The Definitive Guide to Hotwire and Django (2.0.0)
About the Book
This book will help you to learn Hotwire with Django in systematic way.
By the end of this book, you will be able to:
- Learn Howtwire includes
Turbo
andStimulus
, and what problem they can help solve. - Jump start frontend project bundled by Webpack.
- Setup Turbo and Stimulus.
- Learn how page navigation works in
Turbo Drive
- Understand what is cache in Turbo Drive and how preview works.
- Learn what is
Turbo Frame
and how it works. - Build
Inline Editing
feature withTurbo Frame
. - Learn what is
Stimulus
and howStimulus Controller
work. - What is Stimulus
Values
,Targes
, andActions
- Use Stimulus to build a Datetime picker and improve form submission process.
- Understand how to use events to do communication among Stimulus controllers
- Build
Type as search
feature with Stimulus, Turbo and Django. - Learn what is
Turbo Stream
and how it works. - How to build
Collaborative Editing
based on Websocket andTurbo Stream
With Hotwire, we can bring SPA-like experience
to our Django web app:
- We do NOT need heavy frontend solution such as React, Vue
- We do NOT need JSON and Django REST framework
- We will use Django form, Django templates and they still rock.
Changelog:
2.0.0 Released 2023-06-20
- Upgrade to Django 4.2
- Upgrade to Turbo 7.3
- Upgrade to Stimulus 3.2.1
- Add content about Stimulus Outlets
1.0.0 Released 2022-05-27
Table of Contents
- 1. Introduction
- 2. Create A project
- 3. Setup Turbo
- 4. Create Task App
- 5. Render Django Form with Tailwind CSS Style
- 6. Explore Turbo Drive (Page Navigation)
- 7. Explore Turbo Drive (Cache)
- 8. Explore Turbo Drive (Javascript, CSS)
- 9. Explore Turbo Drive (3-party Javascript)
- 10. Turbo Drive and Django form validation
- 11. Prepare to learn Turbo Frame
- 12. Turbo Frame Basics
- 13. Turbo Frame and Django Form
- 14. Inline Editing with Turbo Frames
- 15. Prepare Django app to learn Stimulus Basics
- 16. Stimulus Controller Basics
- 17. Stimulus Controller (Actions, Values)
- 18. Stimulus Controller (Targets, CSS classes)
- 19. Stimulus Controller (Lifecycle)
- 20. Stimulus Controller (3-party Resources)
- 21. Stimulus Controller (Date Picker)
- 22. Stimulus Controller (Form Submission)
- 23. Prepare Django app to learn Stimulus and Turbo Frame
- 24. Stimulus Controller (Flash Message)
- 25. Build Stimulus Controller for Modal
- 26. Load Form in the Modal
- 27. Handle Form Submission in Modal
- 28. Full Page Redirect in Modal
- 29. Communication Among Stimulus Controllers Via Events
- 30. Prepare Django app to learn Stimulus Stream
- 31. Import Turbo Frame
- 32. Turbo Stream Basics
- 33. Use Turbo Stream to improve inline editing
- 34. Filtering on the List Page
- 35. Auto Search
- 36. RealTime Update based on Websocket (Part 1)
- 37. RealTime Update based on Websocket (Part 2)
- 38. Next Steps
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them