Commit 3081af56 authored by Stephanie Tullao's avatar Stephanie Tullao

Added admin view for Reply and updated admin view for Post

parent 92dc8e17
from django.contrib import admin from django.contrib import admin
from .models import Post from .models import Post, Reply
class PostAdmin(admin.ModelAdmin): class PostAdmin(admin.ModelAdmin):
model = Post model = Post
list_display = ('post_title', 'post_body', 'pub_date') list_display = ('post_title', 'post_body', 'pub_date', 'author')
admin.site.register(Post, PostAdmin) class ReplyAdmin(admin.ModelAdmin):
\ No newline at end of file model = Reply
list_display = ('reply_body', 'original_post', 'pub_date', 'author')
admin.site.register(Post, PostAdmin)
admin.site.register(Reply, ReplyAdmin)
\ 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