1 from django.contrib import admin
2 from .models import Question
4 class QuestionAdmin(admin.ModelAdmin):
6 list_filter = ('approved', 'answered', 'published')
7 list_display = ('question', 'email', 'created_at', 'approved', 'answered', 'published')
8 date_hierarchy = 'created_at'
10 ('email', 'created_at', 'changed_at'),
15 ('answered', 'answered_at'),
16 ('published', 'published_at'),
19 readonly_fields = ['created_at', 'answered_at', 'published_at', 'changed_at']
22 admin.site.register(Question, QuestionAdmin)