mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-22 07:52:15 +00:00
Start work on sample data command
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user