Skip to content

Commit 2c6435a

Browse files
[associated_data] Update admin panel to be read-only
1 parent ce67339 commit 2c6435a

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

admin/views/associated_data.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,17 @@ class AssociatedDataAdmin(OcotilloModelView):
6363
"object_id": "OBJECTID",
6464
"thing_id": "ThingID",
6565
}
66+
67+
# ========== READ ONLY ==========
68+
enable_publish_actions = (
69+
False # hides publish/unpublish actions inherited from base
70+
)
71+
72+
def can_create(self, request) -> bool:
73+
return False
74+
75+
def can_edit(self, request) -> bool:
76+
return False
77+
78+
def can_delete(self, request) -> bool:
79+
return False

0 commit comments

Comments
 (0)