Backport common mixin and generics improvements

* Rename get_object_list to get_source_queryset.
* Add uniqueness validation to SingleObjectCreateView.
* Remove MultipleInstanceActionMixin.
* Backport MultipleObjectMixin improvements.
* Remove ObjectListPermissionFilterMixin.
* Add and improve tests.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-05-06 02:07:35 -04:00
parent 7181852c2d
commit 95a1df8072
72 changed files with 1330 additions and 1092 deletions

View File

@@ -51,7 +51,7 @@ class DocumentWorkflowInstanceListView(SingleObjectListView):
) % self.get_document(),
}
def get_object_list(self):
def get_source_queryset(self):
return self.get_document().workflows.all()
@@ -77,7 +77,7 @@ class WorkflowInstanceDetailView(SingleObjectListView):
'workflow_instance': self.get_workflow_instance(),
}
def get_object_list(self):
def get_source_queryset(self):
return self.get_workflow_instance().log_entries.order_by('-datetime')
def get_workflow_instance(self):