From 4b4032be6f984cea34aeb7a52cbfcc38bc389b35 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 20 Nov 2022 11:18:42 -0700 Subject: Add Sentry error integration option --- activities/admin.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activities') diff --git a/activities/admin.py b/activities/admin.py index e24304d..ba809a8 100644 --- a/activities/admin.py +++ b/activities/admin.py @@ -32,6 +32,12 @@ class PostAdmin(admin.ModelAdmin): def object_json(self, instance): return instance.to_ap() + def has_add_permission(self, request, obj=None): + """ + Disables admin creation of posts as it will skip steps + """ + return False + @admin.register(TimelineEvent) class TimelineEventAdmin(admin.ModelAdmin): -- cgit v1.2.3