From 0221ea261fe32b30d441ea10ea39256c0f9b82e3 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 27 Nov 2022 17:16:09 -0700 Subject: Admin tweaks --- activities/admin.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'activities') diff --git a/activities/admin.py b/activities/admin.py index ba809a8..8e29d22 100644 --- a/activities/admin.py +++ b/activities/admin.py @@ -50,6 +50,9 @@ class TimelineEventAdmin(admin.ModelAdmin): "subject_post_interaction", ] + def has_add_permission(self, request, obj=None): + return False + @admin.register(FanOut) class FanOutAdmin(admin.ModelAdmin): @@ -63,8 +66,14 @@ class FanOutAdmin(admin.ModelAdmin): for instance in queryset: instance.transition_perform("new") + def has_add_permission(self, request, obj=None): + return False + @admin.register(PostInteraction) class PostInteractionAdmin(admin.ModelAdmin): list_display = ["id", "state", "state_attempted", "type", "identity", "post"] raw_id_fields = ["identity", "post"] + + def has_add_permission(self, request, obj=None): + return False -- cgit v1.2.3