audit: move events list from admin to audit app
This commit is contained in:
parent
bf297b8593
commit
f040223646
|
@ -3,7 +3,6 @@ from django.urls import path
|
||||||
|
|
||||||
from passbook.admin.views import (
|
from passbook.admin.views import (
|
||||||
applications,
|
applications,
|
||||||
audit,
|
|
||||||
certificate_key_pair,
|
certificate_key_pair,
|
||||||
debug,
|
debug,
|
||||||
flows,
|
flows,
|
||||||
|
@ -252,8 +251,6 @@ urlpatterns = [
|
||||||
certificate_key_pair.CertificateKeyPairDeleteView.as_view(),
|
certificate_key_pair.CertificateKeyPairDeleteView.as_view(),
|
||||||
name="certificatekeypair-delete",
|
name="certificatekeypair-delete",
|
||||||
),
|
),
|
||||||
# Audit Log
|
|
||||||
path("audit/", audit.EventListView.as_view(), name="audit-log"),
|
|
||||||
# Groups
|
# Groups
|
||||||
path("groups/", groups.GroupListView.as_view(), name="groups"),
|
path("groups/", groups.GroupListView.as_view(), name="groups"),
|
||||||
# Debug
|
# Debug
|
||||||
|
|
|
@ -1,2 +1,9 @@
|
||||||
"""passbook audit urls"""
|
"""passbook audit urls"""
|
||||||
urlpatterns = []
|
from django.urls import path
|
||||||
|
|
||||||
|
from passbook.audit.views import EventListView
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
# Audit Log
|
||||||
|
path("audit/", EventListView.as_view(), name="log"),
|
||||||
|
]
|
||||||
|
|
|
@ -9,7 +9,7 @@ class EventListView(PermissionListMixin, ListView):
|
||||||
"""Show list of all invitations"""
|
"""Show list of all invitations"""
|
||||||
|
|
||||||
model = Event
|
model = Event
|
||||||
template_name = "administration/audit/list.html"
|
template_name = "audit/list.html"
|
||||||
permission_required = "passbook_audit.view_event"
|
permission_required = "passbook_audit.view_event"
|
||||||
ordering = "-created"
|
ordering = "-created"
|
||||||
paginate_by = 20
|
paginate_by = 20
|
|
@ -32,8 +32,8 @@
|
||||||
{% if user.is_superuser %}
|
{% if user.is_superuser %}
|
||||||
<li class="pf-c-nav__item"><a class="pf-c-nav__link {% is_active_app 'passbook_admin' %}"
|
<li class="pf-c-nav__item"><a class="pf-c-nav__link {% is_active_app 'passbook_admin' %}"
|
||||||
href="{% url 'passbook_admin:overview' %}">{% trans 'Administrate' %}</a></li>
|
href="{% url 'passbook_admin:overview' %}">{% trans 'Administrate' %}</a></li>
|
||||||
<li class="pf-c-nav__item"><a class="pf-c-nav__link {% is_active_url 'passbook_admin:audit-log' %}"
|
<li class="pf-c-nav__item"><a class="pf-c-nav__link {% is_active_url 'passbook_audit:log' %}"
|
||||||
href="{% url 'passbook_admin:audit-log' %}">{% trans 'Monitor' %}</a></li>
|
href="{% url 'passbook_audit:log' %}">{% trans 'Monitor' %}</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Reference in New Issue