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.
14 lines
548 B
14 lines
548 B
from django.contrib import admin
|
|
from django.utils.translation import gettext_lazy as _
|
|
from ajaxdatatable.admin import AjaxDatatable
|
|
|
|
from apps.account.models import User, Notification
|
|
|
|
@admin.register(Notification)
|
|
class NotificationAdmin(AjaxDatatable):
|
|
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',]
|