You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.
I can't get turbo_django (Model)streams to work. Components work, but my ModelStream refuses doing what I want. I suppose there are some errors in the documentation, and at least it should be improved here.
First, at templates.rst, you say room.channel.append(... - room in this case (a ModelStream instance) has no "channel" attr. Maybe you mean "stream" here? But there are other things that are missing. "..., or pass a Django instance..." is a bit weird. I think you mean a Model instance that has a stream attached?
RoomListChannel isn't anything that can be referred to in the tutorial before, and is never explained. Is this a stream?
The turbo_subscribe tag section should be before the usage of it.
If you help me a bit to understand I could try to reorganize and corect this page for "newcomers" like me.
But I need help - because, like I said, using the docs, I can't get ModelStream to work...
The text was updated successfully, but these errors were encountered:
Like always, I find the solution to my problems a few minutes after posting the question to stackoverflow or filing a bug, and after hours/days of searching/debugging. But it discovers another missing hint to add to the docs:
{% turbo_subscribe foo_model %} must be placed inside a template block, if you are using them:
(1) - Yes, room.channel is now room.stream
(2) - To keep with naming conventions, RoomListChannel should be renamed to RoomListStream. And example of the Stream class itself would be helpful.
(4) is related to how django templates work in general. If using an extended template, all template tags and html with the exception of {% load %} must exist inside templates. I'd view this as out of scope for turbo docs, but maybe the problem is with the name of the tag - tubo_subscribe_tag may better signify what is being inserted and remove confusion.
A section dedicated to Turbo + Django development patterns would be immensely helpful as well. I'm keeping track of a few to add.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I can't get turbo_django (Model)streams to work. Components work, but my ModelStream refuses doing what I want. I suppose there are some errors in the documentation, and at least it should be improved here.
room.channel.append(...
- room in this case (aModelStream
instance) has no "channel" attr. Maybe you mean "stream" here? But there are other things that are missing. "..., or pass a Django instance..." is a bit weird. I think you mean a Model instance that has a stream attached?RoomListChannel
isn't anything that can be referred to in the tutorial before, and is never explained. Is this a stream?If you help me a bit to understand I could try to reorganize and corect this page for "newcomers" like me.
But I need help - because, like I said, using the docs, I can't get ModelStream to work...
The text was updated successfully, but these errors were encountered: