myapp/views.py
from django.shortcuts import render from .models import Board def home(request): boards = Board.objects.all() return render(request, 'home.html', {'boards': boards})
templates/home.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Boards</title> </head> <body> <h1>Boards</h1> {% for board in boards %} {{ board.name }} <br> {% endfor %} </body> </html>