Skip to content

Commit

Permalink
Explicitly set model to allow new ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
kmmbvnr committed Apr 30, 2021
1 parent 467479f commit 773d25e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions viewflow/frontend/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ class AllTaskListView(FlowListMixin,
TemplateResponseMixin,
DataTableMixin,
generic.View):
model = Task
list_display = [
'task_hash', 'description', 'process_summary', 'process_url', 'created'
]
Expand Down Expand Up @@ -197,6 +198,7 @@ class AllQueueListView(
'task_hash', 'description', 'process_summary',
'process_url', 'created'
]
model = Task
template_name = 'viewflow/site_queue.html'

def task_hash(self, task):
Expand Down Expand Up @@ -242,6 +244,7 @@ class AllArchiveListView(FlowListMixin,
'task_hash', 'description', 'started',
'finished', 'process_title', 'process_summary',
]
model = Task
template_name = 'viewflow/site_archive.html'

def task_hash(self, task):
Expand Down Expand Up @@ -337,6 +340,7 @@ def get_template_names(self):
def get_queryset(self):
"""Filtered process list."""
process_class = self.flow_class.process_class
self.model = process_class
queryset = process_class.objects.filter(flow_class=self.flow_class)
ordering = self.get_ordering()
if ordering:
Expand Down

0 comments on commit 773d25e

Please sign in to comment.