Commit 824a8e1a authored by karin-kurusu's avatar karin-kurusu

Created admin panel for Forum's models and filled models with instances

parent 61400199
from django.contrib import admin from django.contrib import admin
from .models import ForumPost, Reply
class ForumPostAdmin(admin.ModelAdmin):
model = ForumPost
list_display = ["title", "body", "author"]
class ReplyAdmin(admin.ModelAdmin):
model = Reply
list_display = ["body", "author", "forumpost"]
admin.site.register(ForumPost, ForumPostAdmin)
admin.site.register(Reply, ReplyAdmin)
# Register your models here. # Register your models here.
\ 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