You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
589 B
15 lines
589 B
from django.contrib import admin
|
|
from django.utils.translation import gettext_lazy as _
|
|
from unfold.admin import ModelAdmin
|
|
from utils.admin import project_admin_site
|
|
|
|
from apps.account.models import User, Notification
|
|
|
|
@admin.register(Notification, site=project_admin_site)
|
|
class NotificationAdmin(ModelAdmin):
|
|
list_display = ('title', 'user', 'is_read', 'created_at')
|
|
list_filter = ('is_read', 'created_at')
|
|
search_fields = ('title', 'message', 'user__fullname')
|
|
list_editable = ('is_read',)
|
|
ordering = ('-created_at',)
|
|
autocomplete_fields = ['user',]
|