From c790296c708635262a464a5b0ee1b3dc850ffa74 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Fri, 14 May 2021 22:56:26 -0400 Subject: [PATCH] Inline events in the admin interface --- tasks/admin.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tasks/admin.py b/tasks/admin.py index f2424f0..8d714d4 100644 --- a/tasks/admin.py +++ b/tasks/admin.py @@ -12,9 +12,13 @@ class GroupToolSubscriptionInline(admin.TabularInline): model = GroupToolSubscription +class EventInline(admin.TabularInline): + model = Event + + @admin.register(Task) class TaskAdmin(MarkdownxModelAdmin): - inlines = [GroupTaskSubscriptionInline] + inlines = [GroupTaskSubscriptionInline, EventInline] prepopulated_fields = {"slug": ("name",)} @@ -23,4 +27,4 @@ class ToolAdmin(admin.ModelAdmin): inlines = [GroupToolSubscriptionInline] -admin.site.register(Event) +