Commit 77184c4c authored by Julia Anishka's avatar Julia Anishka

created announcement admin and reaction inline

parent fedf2eb5
from django.contrib import admin
# Register your models here.
from .models import Announcement, Reaction
class ReactionInLine(admin.TabularInline):
model = Reaction
class AnnouncementAdmin(admin.ModelAdmin):
model = Announcement
list_display = ('title', 'body', 'author', 'pub_datetime')
search_fields = ['title', 'body', 'author']
inlines = [ReactionInLine]
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