audit: remove duplicate date column, add search
This commit is contained in:
@ -3,12 +3,16 @@ from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.views.generic import ListView
|
||||
from guardian.mixins import PermissionListMixin
|
||||
|
||||
from passbook.admin.views.utils import UserPaginateListMixin
|
||||
from passbook.admin.views.utils import SearchListMixin, UserPaginateListMixin
|
||||
from passbook.audit.models import Event
|
||||
|
||||
|
||||
class EventListView(
|
||||
PermissionListMixin, LoginRequiredMixin, UserPaginateListMixin, ListView
|
||||
PermissionListMixin,
|
||||
LoginRequiredMixin,
|
||||
SearchListMixin,
|
||||
UserPaginateListMixin,
|
||||
ListView,
|
||||
):
|
||||
"""Show list of all invitations"""
|
||||
|
||||
@ -16,3 +20,11 @@ class EventListView(
|
||||
template_name = "audit/list.html"
|
||||
permission_required = "passbook_audit.view_event"
|
||||
ordering = "-created"
|
||||
|
||||
search_fields = [
|
||||
"user",
|
||||
"action",
|
||||
"app",
|
||||
"context",
|
||||
"client_ip",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user