Commit 18c5d09d authored by Carlo Joseph Echon's avatar Carlo Joseph Echon 🐟

Added Reaction model to Admin

parent 231659e6
from django.contrib import admin
# Register your models here.
from .models import Announcement
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 = Announcement
search_fields = ['announcement', 'reaction_name']
list_display = ('announcement', 'reaction_name', 'tally')
admin.site.register(Announcement, AnnouncementAdmin)
admin.site.register(Reaction, ReactionAdmin)
\ No newline at end of file
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