From 83ebcbb0faba992e7f0fb6b158e5a4da42bd3e98 Mon Sep 17 00:00:00 2001 From: Michaelyin Date: Thu, 9 Nov 2023 11:34:36 +0800 Subject: [PATCH] update doc --- docs/source/template-tags.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/source/template-tags.md b/docs/source/template-tags.md index 6202d7e..b60fbe7 100644 --- a/docs/source/template-tags.md +++ b/docs/source/template-tags.md @@ -87,3 +87,11 @@ return TurboStreamResponse(html) ``` The code in Django view would be much cleaner and easier to maintain. + +## turbo_stream_from + +This can help render `turbo-cable-stream-source` in Django template + +```{note} + is a custom element provided by [turbo-rails](https://github.com/hotwired/turbo-rails/blob/097d8f90cf0c5ed24ac6b1a49cead73d49fa8ab5/app/javascript/turbo/cable_stream_source_element.js) +```