admin: implement search for all views

see #253
This commit is contained in:
Jens Langhammer
2020-10-03 19:32:01 +02:00
parent 0150a5c58c
commit b0602a3215
28 changed files with 275 additions and 31 deletions

View File

@ -15,6 +15,7 @@ from guardian.mixins import PermissionListMixin, PermissionRequiredMixin
from passbook.admin.views.utils import (
BackSuccessUrlMixin,
DeleteMessageView,
SearchListMixin,
UserPaginateListMixin,
)
from passbook.lib.views import CreateAssignPermView
@ -23,7 +24,11 @@ from passbook.outposts.models import Outpost, OutpostConfig
class OutpostListView(
LoginRequiredMixin, PermissionListMixin, UserPaginateListMixin, ListView
LoginRequiredMixin,
PermissionListMixin,
UserPaginateListMixin,
SearchListMixin,
ListView,
):
"""Show list of all outposts"""
@ -31,6 +36,7 @@ class OutpostListView(
permission_required = "passbook_outposts.view_outpost"
ordering = "name"
template_name = "administration/outpost/list.html"
search_fields = ["name", "_config"]
class OutpostCreateView(