11 lines
383 B
Python
11 lines
383 B
Python
|
|
from django.contrib import admin
|
||
|
|
from .models import Notification
|
||
|
|
|
||
|
|
|
||
|
|
@admin.register(Notification)
|
||
|
|
class NotificationAdmin(admin.ModelAdmin):
|
||
|
|
list_display = ('title', 'user', 'notification_type', 'is_read', 'created_at')
|
||
|
|
list_filter = ('notification_type', 'is_read', 'created_at')
|
||
|
|
search_fields = ('title', 'message', 'user__email')
|
||
|
|
readonly_fields = ('created_at',)
|