mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Do not export inactive training items
This commit is contained in:
@@ -28,6 +28,9 @@ class ItemListExport(PrintListView):
|
|||||||
model = models.TrainingItem
|
model = models.TrainingItem
|
||||||
template_name = 'item_list.xml'
|
template_name = 'item_list.xml'
|
||||||
|
|
||||||
|
def get_queryset(self):
|
||||||
|
return self.model.objects.filter(active=True)
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
context['filename'] = "TrainingItemList.pdf"
|
context['filename'] = "TrainingItemList.pdf"
|
||||||
|
|||||||
Reference in New Issue
Block a user