From 5f90515a5943afbdf10fd621b7676a28705e670a Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Mon, 13 Nov 2023 15:47:11 -0800 Subject: [PATCH] Register all misc workspace models in the admin --- primed/miscellaneous_workspaces/admin.py | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/primed/miscellaneous_workspaces/admin.py b/primed/miscellaneous_workspaces/admin.py index dc42e0e5..f367fb22 100644 --- a/primed/miscellaneous_workspaces/admin.py +++ b/primed/miscellaneous_workspaces/admin.py @@ -9,3 +9,42 @@ class SimulatedDataWorkspaceAdmin(SimpleHistoryAdmin): """Admin class for the `SimulatedDataWorkspace` model.""" list_display = ("workspace",) + + +@admin.register(models.ConsortiumDevelWorkspace) +class ConsortiumDevelWorkspaceAdmin(SimpleHistoryAdmin): + """Admin class for the `ConsortiumDevelWorkspace` model.""" + + list_display = ("workspace",) + + +@admin.register(models.ResourceWorkspace) +class ResourceWorkspaceAdmin(SimpleHistoryAdmin): + """Admin class for the `ResourceWorkspace` model.""" + + list_display = ("workspace",) + + +@admin.register(models.TemplateWorkspace) +class TemplateWorkspaceAdmin(SimpleHistoryAdmin): + """Admin class for the `TemplateWorkspace` model.""" + + list_display = ("workspace",) + + +@admin.register(models.OpenAccessWorkspace) +class OpenAccessWorkspaceAdmin(SimpleHistoryAdmin): + """Admin class for the `OpenAccessWorkspace` model.""" + + list_display = ("workspace",) + + +@admin.register(models.DataPrepWorkspace) +class DataPrepWorkspaceAdmin(SimpleHistoryAdmin): + """Admin class for the `DataPrepWorkspace` model.""" + + list_display = ( + "workspace", + "is_active", + ) + list_filter = ("is_active",)