mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-18 05:52:15 +00:00
14 lines
405 B
Python
14 lines
405 B
Python
from django.shortcuts import render
|
|
|
|
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
|