Commit 4a69aebf authored by Julia Anishka's avatar Julia Anishka

created reaction admin

parent 77184c4c
......@@ -11,3 +11,14 @@ class AnnouncementAdmin(admin.ModelAdmin):
search_fields = ['title', 'body', 'author']
inlines = [ReactionInLine]
class ReactionAdmin(admin.ModelAdmin):
list_display = ('name', 'tally', 'get_announcement')
def get_announcement(self, obj):
return obj.announcement.title
get_announcement.short_description = 'Announcement Title'
admin.site.register(Announcement, AnnouncementAdmin)
admin.site.register(Reaction, ReactionAdmin)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment