12 lines
370 B
Python
12 lines
370 B
Python
from django.contrib import admin
|
|
from .models import Notification
|
|
|
|
|
|
@admin.register(Notification)
|
|
class NotificationAdmin(admin.ModelAdmin):
|
|
list_display = ['id', 'user', 'type', 'title', 'is_read', 'created_at']
|
|
list_filter = ['type', 'is_read']
|
|
search_fields = ['title', 'content', 'user__name']
|
|
ordering = ['-created_at']
|
|
raw_id_fields = ['user']
|