Thoughts on Django Template Setup Posted in Django


Posted on Sept. 27, 2016

Some interesting ideas on an easier base template setup inside Django sites.

<html>
<head>

{% block js-head %} Tags that need to go up top  {% endblock js-head %}

</head>
<body>
{% block header %}  Header {% endblock header %}

{% block body %} Body goes here {% endblock body %}

{% block footer %}  Footer {% endblock footer %}

{% block js-foot %}  All other javascript goes here {% endblock js-foot %}
</body>
</html>

This setup allows for easier management of static assets like JS and CSS files.