Commit f989bad9 authored by Jan Enzo Salvador's avatar Jan Enzo Salvador

Created admin panels for forum\models.py

parent 3df59488
from django.contrib import admin
from .models import ForumPost, Reply
# Register your models here.
class ReplyInline(admin.TabularInline):
model = Reply
class ForumPostAdmin(admin.ModelAdmin):
model = ForumPost
list_display = ("title", "author", "body", "pub_datetime")
class ReplyAdmin(admin.ModelAdmin):
model = Reply
list_display = ("forum_post", "author", "body", "pub_datetime")
admin.site.register(ForumPost, ForumPostAdmin)
admin.site.register(Reply, ReplyAdmin)
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