Skip to content
Snippets Groups Projects
Commit bf69fc8c authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Fix filter

parent 72c17bea
No related branches found
No related tags found
1 merge request!1Reformat and cleanup
......@@ -5,7 +5,7 @@ from material import Layout, Row
from aleksis.core.filters import MultipleCharFilter
from .models import EventRegistration, FeedbackAspect, Voucher
from .models import Event, EventRegistration, FeedbackAspect, Voucher
class EventRegistrationFilter(FilterSet):
......@@ -25,7 +25,7 @@ class EventRegistrationFilter(FilterSet):
class VoucherFilter(FilterSet):
event = MultipleCharFilter(
[
"event__short_name__icontains",
"event__display_name__icontains",
],
label=_("Search by event"),
)
......@@ -52,3 +52,17 @@ class FeedbackAspectsFilter(FilterSet):
class Meta:
model = FeedbackAspect
fields = ["aspect"]
class EventFilter(FilterSet):
class Meta:
model = Event
fields = ["display_name", "published", "place"]
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.form.layout = Layout(
Row("display_name"),
Row("published", "place"),
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment