Skip to content

Add Turbo/HTMX script templatetag? #1762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
joshuadavidthomas opened this issue Apr 12, 2023 · 4 comments
Closed

Add Turbo/HTMX script templatetag? #1762

joshuadavidthomas opened this issue Apr 12, 2023 · 4 comments

Comments

@joshuadavidthomas
Copy link
Member

Would it be useful for debug toolbar to include the scripts from issue #1179 as a templatetag?

@tim-schilling
Copy link
Member

Hi Josh! I'm not sure. This is one of those integration processes that I'm not 100% on what would be the best for most developers.

That said, it might be good for the toolbar to simply listen to that event and also log something to the console that it occurred. Then provide a way for it to be overridden (maybe via a template override or setting).

@matthiask
Copy link
Member

I could imagine that having those functions by default would be useful for some users while being problematic for very few, since the events are namespaced and everything. If we were to ship them by default we should put them into a file of their own (integrations.js comes to mind?) and allow an easy switch to opt out of loading this file. We could then stuff all known and future integrations in there and tell people to deactivate the integrations file if it proves problematic or if they want to change their integration somewhat?

@joshuadavidthomas
Copy link
Member Author

Not sure when this was added, but this section on working with htmx from the docs solved my problem.

@tim-schilling
Copy link
Member

Thanks for catching that and cleaning this up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants