This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2019-10-28 13:26:34 +00:00
|
|
|
"""passbook Event administration"""
|
2018-12-14 09:28:37 +00:00
|
|
|
from django.views.generic import ListView
|
2019-10-10 11:01:49 +00:00
|
|
|
from guardian.mixins import PermissionListMixin
|
2018-12-14 09:28:37 +00:00
|
|
|
|
2019-10-28 13:26:34 +00:00
|
|
|
from passbook.audit.models import Event
|
2018-12-14 09:28:37 +00:00
|
|
|
|
|
|
|
|
2019-10-28 13:26:34 +00:00
|
|
|
class EventListView(PermissionListMixin, ListView):
|
2018-12-14 09:28:37 +00:00
|
|
|
"""Show list of all invitations"""
|
|
|
|
|
2019-10-28 13:26:34 +00:00
|
|
|
model = Event
|
2018-12-14 09:28:37 +00:00
|
|
|
template_name = 'administration/audit/list.html'
|
2019-10-28 13:26:34 +00:00
|
|
|
permission_required = 'passbook_audit.view_event'
|
2019-10-10 11:01:49 +00:00
|
|
|
ordering = '-created'
|
2018-12-14 09:28:37 +00:00
|
|
|
paginate_by = 10
|
|
|
|
|
|
|
|
def get_queryset(self):
|
2019-10-28 13:26:34 +00:00
|
|
|
return Event.objects.all().order_by('-created')
|