Answer the question
In order to leave comments, you need to log in
How to properly include css, js for inclusion_tag?
For example, there is a newsfeed application with an inclusion_tag that displays a subscription form.
Added class Media with css and js to the form. In the form template, it includes files as expected, everything works: {{ form.media }}
But in the middle of the page, including styles is somehow not very good. I would like to put them in
How is it usually implemented, or maybe my approach is wrong in general? I thought it was possible somehow through takes_context = True, but I didn’t think of how
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question