konova/intervention/filters.py
mpeltriaux 0cb65ae720 # 61 Filter offices frontend/backend
* adds filters for registration and conservation offices
* adds SelectionTableFilter as new holder for these types of filter components
2022-01-12 08:56:49 +01:00

38 lines
1.0 KiB
Python

"""
Author: Michel Peltriaux
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
Contact: michel.peltriaux@sgdnord.rlp.de
Created on: 22.07.21
"""
from konova.filters import QueryTableFilter, CheckboxTableFilter, SelectionTableFilter
class InterventionTableFilter:
selection_filter = None
query_filter = None
checkbox_filter = None
qs = None
def __init__(self, *args, **kwargs):
user = kwargs.get("user", None)
qs = kwargs.get("queryset", None)
request_data = kwargs.get("data", None)
self.selection_filter = SelectionTableFilter(
user=user,
data=request_data,
queryset=qs,
)
self.query_filter = QueryTableFilter(
user=user,
data=request_data,
queryset=self.selection_filter.qs,
)
self.checkbox_filter = CheckboxTableFilter(
user=user,
data=request_data,
queryset=self.query_filter.qs,
)
self.qs = self.checkbox_filter.qs