From 69dde4106648aca1ac3a203b6d03501b33eead29 Mon Sep 17 00:00:00 2001 From: pnshiralkar Date: Wed, 6 May 2020 16:12:42 +0530 Subject: Added workshop comments, linked it to workshop_status tables --- workshop_app/admin.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'workshop_app/admin.py') diff --git a/workshop_app/admin.py b/workshop_app/admin.py index 4e3d333..5182776 100644 --- a/workshop_app/admin.py +++ b/workshop_app/admin.py @@ -6,7 +6,7 @@ from django.http import HttpResponse from .models import ( Profile, WorkshopType, Workshop, - Testimonial, ProfileComments, Banner, AttachmentFile + Testimonial, WorkshopComment, Banner, AttachmentFile ) try: @@ -117,8 +117,9 @@ class TestimonialAdmin(admin.ModelAdmin): download_csv.short_description = "Download CSV file for selected stats." -class ProfileCommentAdmin(admin.ModelAdmin): - list_display = ['comment', 'created_date', 'coordinator', 'instructor'] +class WorkshopCommentAdmin(admin.ModelAdmin): + list_display = ['workshop', 'comment', 'created_date', 'author', 'public'] + list_filter = ['workshop', 'author', 'created_date', 'public'] # Register your models here. @@ -126,6 +127,6 @@ admin.site.register(Profile, ProfileAdmin) admin.site.register(WorkshopType, WorkshopTypeAdmin) admin.site.register(Workshop, WorkshopAdmin) admin.site.register(Testimonial, TestimonialAdmin) -admin.site.register(ProfileComments, ProfileCommentAdmin) +admin.site.register(WorkshopComment, WorkshopCommentAdmin) admin.site.register(Banner) admin.site.register(AttachmentFile) -- cgit