Start work on sample data command

This commit is contained in:
2021-06-30 15:56:28 +01:00
parent f8624d3b7a
commit b1646d556c
10 changed files with 77 additions and 5 deletions

View File

@@ -1,3 +1,13 @@
from django.shortcuts import render
# Create your views here.
from django.views import generic
from training import models
class ItemList(generic.ListView):
template_name = "item_list.html"
model = models.TrainingItem
def get_context_data(self, **kwargs):
context = super(ItemList, self).get_context_data(**kwargs)
context["categories"] = models.TrainingCategory.objects.all()
return context