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
@@ -75,7 +75,7 @@ class WorkflowListView(SingleObjectListView):
'title': _('Workflows'),
}
def get_object_list(self):
def get_source_queryset(self):
return WorkflowRuntimeProxy.objects.all()
@@ -148,7 +148,7 @@ class WorkflowStateListView(SingleObjectListView):
'title': _('States of workflow: %s') % self.get_workflow()
}
def get_object_list(self):
def get_source_queryset(self):
return WorkflowStateRuntimeProxy.objects.filter(
workflow=self.get_workflow()
)