Django and Datastar integration - hypermedia example with Django and the Datastar Python SDK!

Опубликовано: 24 Июль 2026
на канале: BugBytes
7,641
343

🙏 Join our channel to get access to perks:
   / @bugbytes3923  

☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying a coffee here:
https://ko-fi.com/bugbytes

In this video, we'll explore a practical example of integrating Django and Datastar together to build a hypermedia web application. We'll explore a click to load example and will introduce the Python SDK for Datastar.

📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro - Datastar & Django!
01:03 Datastar backend SDKs
04:55 Paginating content with Django
07:19 Installing datastar-py
09:30 Datastar GET action plugin to send requests
11:57 Checking for Datastar request in Django view
12:57 Creating template partial (template fragment)
15:17 Returning DatastarResponse from Django view
20:29 Using Datastar signals to communicate state
25:03 Removing ‘load more’ button with remove_fragments event type
27:30 data-indicator attribute
30:20 Django StreamingHttpResponse class

𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: https://bugbytes.io/posts/
👾 Github: https://github.com/bugbytes-io/

📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
Datastar: https://data-star.dev/
datastar-py: https://pypi.org/project/datastar-py/

#django #datastar