mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-05-16 11:33:11 +00:00
Support search by custom USERNAME_FIELD
This commit is contained in:
parent
9976cc1cc6
commit
817af66641
1 changed files with 2 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from django.conf import settings
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.core.paginator import Paginator
|
||||
from django.utils.functional import cached_property
|
||||
|
||||
|
|
@ -33,7 +34,7 @@ class LogEntryAdmin(admin.ModelAdmin, LogEntryAdminMixin):
|
|||
"changes",
|
||||
"actor__first_name",
|
||||
"actor__last_name",
|
||||
"actor__username",
|
||||
"actor__{}".format(get_user_model().USERNAME_FIELD),
|
||||
]
|
||||
list_filter = [
|
||||
"action",
|
||||
|
|
|
|||
Loading…
Reference in a new issue