mirror of
https://github.com/Hopiu/django-notifications.git
synced 2026-05-03 11:04:43 +00:00
16 lines
427 B
Python
16 lines
427 B
Python
from django.contrib import admin
|
|
|
|
|
|
class AbstractNotificationAdmin(admin.ModelAdmin):
|
|
raw_id_fields = ("recipient",)
|
|
list_display = ("recipient", "actor", "level", "target", "unread", "public")
|
|
list_filter = (
|
|
"level",
|
|
"unread",
|
|
"public",
|
|
"timestamp",
|
|
)
|
|
|
|
def get_queryset(self, request):
|
|
qs = super().get_queryset(request)
|
|
return qs.prefetch_related("actor")
|