Get your own website
mymaster.html
views.py
template.html
 
<!DOCTYPE html>
<html>
<body>

{% block myheading %}
{% endblock %}

{% block mymessage %}
{% endblock %}

<p>Check out the two templates to see what they look like,
and views.py to see the reference to the child template
and to see how the members variable looks like.</p>

</body>
</html>                  
from django.http import HttpResponse
from django.template import loader
from .models import Members

def testing(request):
  mymembers = Members.objects.all().values()
  template = loader.get_template('template.html')
  context = {
    'members': mymembers,
  }
  return HttpResponse(template.render(context, request))                      
{% extends 'mymaster.html' %}

{% block myheading %}
  <h1>Members</h1>
{% endblock %}

{% block mymessage %}
  <ul>
    {% for x in members %}
      <li>{{ x.firstname }}</li>
    {% endfor %}
  </ul>
{% endblock %}                   
127.0.0.1:8000/members/testing