so I just started reading a book on Django (for beginners) and I came across the following code snipet:
Home
That's where the power of the templates comes from in a sense.
You can create a hierarchy of templates so start with base.html
which might be like you've got above;
{% block content %}
{% endblock content %}
Then you can create any other template, home.html
for example, and do something like;
{% extends "base.html" %}
{% block content %}
Welcome
This is the home page
{% endblock content %}
Then you'd reference home.html
in django and it'd include the markup from base.py
with the content defined in home.html
.
That's the basics, but if you put some templates together using blocks you'll pick it up.