2018-12-14 09:28:37 +00:00
|
|
|
"""passbook AuditEntry administration"""
|
|
|
|
from django.views.generic import ListView
|
2019-10-10 12:01:49 +01:00
|
|
|
from guardian.mixins import PermissionListMixin
|
2018-12-14 09:28:37 +00:00
|
|
|
|
|
|
|
from passbook.audit.models import AuditEntry
|
|
|
|
|
|
|
|
|
2019-10-10 12:01:49 +01:00
|
|
|
class AuditEntryListView(PermissionListMixin, ListView):
|
2018-12-14 09:28:37 +00:00
|
|
|
"""Show list of all invitations"""
|
|
|
|
|
|
|
|
model = AuditEntry
|
|
|
|
template_name = 'administration/audit/list.html'
|
2019-10-10 12:01:49 +01:00
|
|
|
permission_required = 'passbook_audit.view_auditentry'
|
|
|
|
ordering = '-created'
|
2018-12-14 09:28:37 +00:00
|
|
|
paginate_by = 10
|
|
|
|
|
|
|
|
def get_queryset(self):
|
|
|
|
return AuditEntry.objects.all().order_by('-created')
|