Componentization in Django apps using custom template tags with script tag

I’m developing a Django project, comprising of several apps.
I have a base app that contains global stuff, such as CSS, JS, custom template tags (I will call them CTTs from now on), etc.

The thing is, I would like to have some CTTs that include HTML and script tags with JS code (eg. autocomplete inputs, delete button with confirmation modal, etc). My intention here is to have self-contained components to be plugged all across the project.

My concern is if this would be a good practice, as I would not separate JS code in ‘.js’ files and stuff. I tend to think that this would be ok, as the behaviour provided by JS code would be in a certain way incapsulated in the CTTs.

Would like to hear opinions about this =)