I have a simple question. I know how to use django media to host js and css files specified in the media class as follows:
In forms.py for the model
from django import forms
class CalendarWidget(forms.TextInput):
class Media:
css = {
'all': ('pretty.css',)
}
js = ('animations.js', 'actions.js')
In the template file
{{ form.media }}
However, I want to host JS and CSS separately. This means that I want to put CSS in the chapter section and JS before the body tag. So how can I achieve this using assembly in tags? Is it possible?
PS I can not find out the information from the django documentation. (Maybe I'm looking the wrong way). So give me a hint.
source
share