from django.contrib import admin

# Register your models here.
from .models import Announcement, Reaction

class AnnouncementAdmin(admin.ModelAdmin):
    model = Announcement
    search_fields = ['announcement_title', 'announcement_body']
    list_display = ('announcement_title', 'announcement_body', 'pub_date')
class ReactionAdmin(admin.ModelAdmin):
    model = Reaction
    search_fields = ['announcement', 'reaction_name']
    list_display = ('announcement', 'reaction_name', 'tally')

admin.site.register(Announcement, AnnouncementAdmin)
admin.site.register(Reaction, ReactionAdmin)