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

Allow filtering by state

parent aeeefc92
No related branches found
No related tags found
1 merge request!13Resolve "State flags for registrations"
Pipeline #58512 failed
...@@ -11,13 +11,13 @@ from .models import Event, EventRegistration, Terms, Voucher ...@@ -11,13 +11,13 @@ from .models import Event, EventRegistration, Terms, Voucher
class EventRegistrationFilter(FilterSet): class EventRegistrationFilter(FilterSet):
class Meta: class Meta:
model = EventRegistration model = EventRegistration
fields = ["person", "event", "accept_sepa", "date_registered"] fields = ["person", "event", "accept_sepa", "date_registered", "states"]
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
self.form.layout = Layout( self.form.layout = Layout(
Row("person", "event"), Row("person", "event", "states"),
Row("accept_sepa", "date_registered"), Row("accept_sepa", "date_registered"),
) )
......
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