Commit 29a9ea7c authored by Jan Enzo Salvador's avatar Jan Enzo Salvador

Added inlines in admin.py of forum for easier access to population of data

parent 000f0c02
from django.contrib import admin
from .models import ForumPost, Reply
class ReplyInline(admin.TabularInline):
class ReplyInLine(admin.TabularInline):
model = Reply
class ForumPostAdmin(admin.ModelAdmin):
model = ForumPost
list_display = ("title", "author", "body", "pub_datetime")
inlines = [ReplyInLine]
class ReplyAdmin(admin.ModelAdmin):
......
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