21 lines
663 B
Python
21 lines
663 B
Python
from django.contrib import admin
|
|
|
|
from .models import AuditLog, ModerationRequest
|
|
|
|
|
|
@admin.register(ModerationRequest)
|
|
class ModerationRequestAdmin(admin.ModelAdmin):
|
|
list_display = (
|
|
'content_type', 'object_id', 'user', 'decision',
|
|
'moderator', 'created_at', 'decided_at',
|
|
)
|
|
list_filter = ('decision', 'content_type')
|
|
search_fields = ('comment', 'user__username', 'user__full_name')
|
|
|
|
|
|
@admin.register(AuditLog)
|
|
class AuditLogAdmin(admin.ModelAdmin):
|
|
list_display = ('created_at', 'user', 'action', 'object_repr')
|
|
list_filter = ('action',)
|
|
search_fields = ('action', 'object_repr')
|
|
readonly_fields = ('created_at',) |