Replies: 1 comment 7 replies
-
This about template fragments, right? I've been thinking about it but don't have a clear view now of how that'd work in django-components. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For a few days, I have been working on a component that includes autocomplete. It may be a generic autocomplete component in the future, but currently it is related to the business logic.
I have been iimplementing it with django components, Alpine.js, HTMX and Bootstrap 5.
Currently, there are two components, "composition_search" and "composition_list_editor". The former is actually not a component in itself, but provides an HTMX endpoint to the latter, search results as <div> elements. So these two are tightly coupled.
I started thinking that perhaps they are so tightly coupled that they conceptually actually belong to the same component. The reason they are seperate components is that django components does not support having multiple different kind of endpoints per component, because there is view per component relationshp.
If you think about it, views are a way to express operations as endpoints, and it really makes sense that there can be many operations for a single component, especially in the HTMX world.
Currently, this is not a big issue for me, but just wanted to get the idea out there.
Beta Was this translation helpful? Give feedback.
All reactions