Hi everyone,
I’ve a question about loading CSS and JS files. The normal command for
doing so is:
I’m doing that in my Base.html because it’s the only HTML file which
contain a tag.
All the other templates just extend that.
My question now, is there any way that I can make some kind of
temp
Hi,
What I do is put an empty {% block extrahead %}{% endblock %} and {% block
extrastyle %}{% endblock %} in my base.html. Then in any specific template
that extends base or base_site, I can fill in those blocks with {% block
extrastyle %}{% endblock %}. Otherwise it will be
served up blank.
Ho
Instead of using an "extra" head, you could do this:
Put your main css/js declaration inside a block in your base.html:
{% block headstuff %} blabla {% endblock %}
In templates that extend base.html and you want to add to this, do as
follows:
{% block headstuff %} {{block.super}} more bla {% end
3 matches
Mail list logo