views.py 484 Bytes
Newer Older
Dennis Appel's avatar
Dennis Appel committed
1 2 3 4 5
from django.http import HttpResponseRedirect
from django.shortcuts import render
from django.urls import reverse
from django.views import generic

Dennis Appel's avatar
Dennis Appel committed
6
from .models import CheckListCategory
Dennis Appel's avatar
Dennis Appel committed
7

8

Dennis Appel's avatar
Dennis Appel committed
9
class IndexView(generic.ListView):
10 11 12 13
    """
    Default view for checklist page.
    Passes date from models to checklist template.
    """
Dennis Appel's avatar
Dennis Appel committed
14
    template_name = 'checklist/index.html'
15
    context_object_name = 'checklist'
Dennis Appel's avatar
Dennis Appel committed
16

Dennis Appel's avatar
Dennis Appel committed
17 18 19
    def get_queryset(self):
        return CheckListCategory.objects.all()