We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add  filter for default training requests view 
The [training requests view](https://amy.carpentries.org/requests/training_requests/) returns all training requests (currently over 7000 results).  This makes the page load very slowly (possibly related to #2314).

Default search results should be:
* State:  Pending or accepted
* Is Matched: Unmatched 

We should then be able to adjust search as we currently do.

Edit to note in effect, the link to Training requests should go [here](https://amy.carpentries.org/requests/training_requests/?search=&group_name=&state=no_d&matched=u&affiliation=&location=&order_by=) instead of [here](https://amy.carpentries.org/requests/training_requests/).

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `amy/extrequests/filters.py`
Content:
```
1 import re
2 
3 from django.db.models import Q
4 from django.forms import widgets
5 import django_filters
6 
7 from extrequests.models import SelfOrganisedSubmission, WorkshopInquiryRequest
8 from workshops.fields import Select2Widget
9 from workshops.filters import (
10     AllCountriesFilter,
11     AMYFilterSet,
12     ContinentFilter,
13     ForeignKeyAllValuesFilter,
14     NamesOrderingFilter,
15     StateFilterSet,
16 )
17 from workshops.models import Curriculum, Person, TrainingRequest, WorkshopRequest
18 
19 # ------------------------------------------------------------
20 # TrainingRequest related filter and filter methods
21 # ------------------------------------------------------------
22 
23 
24 class TrainingRequestFilter(AMYFilterSet):
25     search = django_filters.CharFilter(
26         label="Name or Email",
27         method="filter_by_person",
28     )
29 
30     group_name = django_filters.CharFilter(
31         field_name="group_name", lookup_expr="icontains", label="Group"
32     )
33 
34     state = django_filters.ChoiceFilter(
35         label="State",
36         choices=(("no_d", "Pending or accepted"),) + TrainingRequest.STATE_CHOICES,
37         method="filter_training_requests_by_state",
38     )
39 
40     matched = django_filters.ChoiceFilter(
41         label="Is Matched?",
42         choices=(
43             ("", "Unknown"),
44             ("u", "Unmatched"),
45             ("p", "Matched trainee, unmatched training"),
46             ("t", "Matched trainee and training"),
47         ),
48         method="filter_matched",
49     )
50 
51     nonnull_manual_score = django_filters.BooleanFilter(
52         label="Manual score applied",
53         method="filter_non_null_manual_score",
54         widget=widgets.CheckboxInput,
55     )
56 
57     affiliation = django_filters.CharFilter(
58         method="filter_affiliation",
59     )
60 
61     location = django_filters.CharFilter(lookup_expr="icontains")
62 
63     order_by = NamesOrderingFilter(
64         fields=(
65             "created_at",
66             "score_total",
67         ),
68     )
69 
70     class Meta:
71         model = TrainingRequest
72         fields = [
73             "search",
74             "group_name",
75             "state",
76             "matched",
77             "affiliation",
78             "location",
79         ]
80 
81     def filter_matched(self, queryset, name, choice):
82         if choice == "":
83             return queryset
84         elif choice == "u":  # unmatched
85             return queryset.filter(person=None)
86         elif choice == "p":  # matched trainee, unmatched training
87             return (
88                 queryset.filter(person__isnull=False)
89                 .exclude(
90                     person__task__role__name="learner",
91                     person__task__event__tags__name="TTT",
92                 )
93                 .distinct()
94             )
95         else:  # choice == 't' <==> matched trainee and training
96             return queryset.filter(
97                 person__task__role__name="learner",
98                 person__task__event__tags__name="TTT",
99             ).distinct()
100 
101     def filter_by_person(self, queryset, name, value):
102         if value == "":
103             return queryset
104         else:
105             # 'Harry Potter' -> ['Harry', 'Potter']
106             tokens = re.split(r"\s+", value)
107             # Each token must match email address or github username or
108             # personal, or family name.
109             for token in tokens:
110                 queryset = queryset.filter(
111                     Q(personal__icontains=token)
112                     | Q(middle__icontains=token)
113                     | Q(family__icontains=token)
114                     | Q(email__icontains=token)
115                     | Q(person__personal__icontains=token)
116                     | Q(person__middle__icontains=token)
117                     | Q(person__family__icontains=token)
118                     | Q(person__email__icontains=token)
119                 )
120             return queryset
121 
122     def filter_affiliation(self, queryset, name, affiliation):
123         if affiliation == "":
124             return queryset
125         else:
126             q = Q(affiliation__icontains=affiliation) | Q(
127                 person__affiliation__icontains=affiliation
128             )
129             return queryset.filter(q).distinct()
130 
131     def filter_training_requests_by_state(self, queryset, name, choice):
132         if choice == "no_d":
133             return queryset.exclude(state="d")
134         else:
135             return queryset.filter(state=choice)
136 
137     def filter_non_null_manual_score(self, queryset, name, manual_score):
138         if manual_score:
139             return queryset.filter(score_manual__isnull=False)
140         return queryset
141 
142 
143 # ------------------------------------------------------------
144 # WorkshopRequest related filter and filter methods
145 # ------------------------------------------------------------
146 
147 
148 class WorkshopRequestFilter(AMYFilterSet, StateFilterSet):
149     assigned_to = ForeignKeyAllValuesFilter(Person, widget=Select2Widget)
150     country = AllCountriesFilter(widget=Select2Widget)
151     continent = ContinentFilter(widget=Select2Widget, label="Continent")
152     requested_workshop_types = django_filters.ModelMultipleChoiceFilter(
153         label="Requested workshop types",
154         queryset=Curriculum.objects.all(),
155         widget=widgets.CheckboxSelectMultiple(),
156     )
157 
158     order_by = django_filters.OrderingFilter(
159         fields=("created_at",),
160     )
161 
162     class Meta:
163         model = WorkshopRequest
164         fields = [
165             "state",
166             "assigned_to",
167             "requested_workshop_types",
168             "country",
169         ]
170 
171 
172 # ------------------------------------------------------------
173 # WorkshopInquiryRequest related filter and filter methods
174 # ------------------------------------------------------------
175 
176 
177 class WorkshopInquiryFilter(AMYFilterSet, StateFilterSet):
178     assigned_to = ForeignKeyAllValuesFilter(Person, widget=Select2Widget)
179     country = AllCountriesFilter(widget=Select2Widget)
180     continent = ContinentFilter(widget=Select2Widget, label="Continent")
181     requested_workshop_types = django_filters.ModelMultipleChoiceFilter(
182         label="Requested workshop types",
183         queryset=Curriculum.objects.all(),
184         widget=widgets.CheckboxSelectMultiple(),
185     )
186 
187     order_by = django_filters.OrderingFilter(
188         fields=("created_at",),
189     )
190 
191     class Meta:
192         model = WorkshopInquiryRequest
193         fields = [
194             "state",
195             "assigned_to",
196             "requested_workshop_types",
197             "country",
198         ]
199 
200 
201 # ------------------------------------------------------------
202 # SelfOrganisedSubmission related filter and filter methods
203 # ------------------------------------------------------------
204 
205 
206 class SelfOrganisedSubmissionFilter(AMYFilterSet, StateFilterSet):
207     assigned_to = ForeignKeyAllValuesFilter(Person, widget=Select2Widget)
208     country = AllCountriesFilter(widget=Select2Widget)
209     continent = ContinentFilter(widget=Select2Widget, label="Continent")
210     workshop_types = django_filters.ModelMultipleChoiceFilter(
211         label="Requested workshop types",
212         queryset=Curriculum.objects.all(),
213         widget=widgets.CheckboxSelectMultiple(),
214     )
215 
216     order_by = django_filters.OrderingFilter(
217         fields=("created_at",),
218     )
219 
220     class Meta:
221         model = SelfOrganisedSubmission
222         fields = [
223             "state",
224             "assigned_to",
225             "workshop_types",
226             "workshop_format",
227         ]
228
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/amy/extrequests/filters.py b/amy/extrequests/filters.py
--- a/amy/extrequests/filters.py
+++ b/amy/extrequests/filters.py
@@ -2,6 +2,7 @@
 
 from django.db.models import Q
 from django.forms import widgets
+from django.http import QueryDict
 import django_filters
 
 from extrequests.models import SelfOrganisedSubmission, WorkshopInquiryRequest
@@ -22,6 +23,16 @@
 
 
 class TrainingRequestFilter(AMYFilterSet):
+    def __init__(self, data=None, *args, **kwargs):
+        # If no filters are set, use some default settings.
+        # This avoids handling the full list of training requests
+        # client-side unless the user deliberately chooses to do so.
+        # See https://github.com/carpentries/amy/issues/2314
+        if not data:
+            data = QueryDict("state=no_d&matched=u")
+
+        super().__init__(data, *args, **kwargs)
+
     search = django_filters.CharFilter(
         label="Name or Email",
         method="filter_by_person",

{"golden_diff": "diff --git a/amy/extrequests/filters.py b/amy/extrequests/filters.py\n--- a/amy/extrequests/filters.py\n+++ b/amy/extrequests/filters.py\n@@ -2,6 +2,7 @@\n \n from django.db.models import Q\n from django.forms import widgets\n+from django.http import QueryDict\n import django_filters\n \n from extrequests.models import SelfOrganisedSubmission, WorkshopInquiryRequest\n@@ -22,6 +23,16 @@\n \n \n class TrainingRequestFilter(AMYFilterSet):\n+    def __init__(self, data=None, *args, **kwargs):\n+        # If no filters are set, use some default settings.\n+        # This avoids handling the full list of training requests\n+        # client-side unless the user deliberately chooses to do so.\n+        # See https://github.com/carpentries/amy/issues/2314\n+        if not data:\n+            data = QueryDict(\"state=no_d&matched=u\")\n+\n+        super().__init__(data, *args, **kwargs)\n+\n     search = django_filters.CharFilter(\n         label=\"Name or Email\",\n         method=\"filter_by_person\",\n", "issue": "Add  filter for default training requests view \nThe [training requests view](https://amy.carpentries.org/requests/training_requests/) returns all training requests (currently over 7000 results).  This makes the page load very slowly (possibly related to #2314).\r\n\r\nDefault search results should be:\r\n* State:  Pending or accepted\r\n* Is Matched: Unmatched \r\n\r\nWe should then be able to adjust search as we currently do.\r\n\r\nEdit to note in effect, the link to Training requests should go [here](https://amy.carpentries.org/requests/training_requests/?search=&group_name=&state=no_d&matched=u&affiliation=&location=&order_by=) instead of [here](https://amy.carpentries.org/requests/training_requests/).\n", "before_files": [{"content": "import re\n\nfrom django.db.models import Q\nfrom django.forms import widgets\nimport django_filters\n\nfrom extrequests.models import SelfOrganisedSubmission, WorkshopInquiryRequest\nfrom workshops.fields import Select2Widget\nfrom workshops.filters import (\n    AllCountriesFilter,\n    AMYFilterSet,\n    ContinentFilter,\n    ForeignKeyAllValuesFilter,\n    NamesOrderingFilter,\n    StateFilterSet,\n)\nfrom workshops.models import Curriculum, Person, TrainingRequest, WorkshopRequest\n\n# ------------------------------------------------------------\n# TrainingRequest related filter and filter methods\n# ------------------------------------------------------------\n\n\nclass TrainingRequestFilter(AMYFilterSet):\n    search = django_filters.CharFilter(\n        label=\"Name or Email\",\n        method=\"filter_by_person\",\n    )\n\n    group_name = django_filters.CharFilter(\n        field_name=\"group_name\", lookup_expr=\"icontains\", label=\"Group\"\n    )\n\n    state = django_filters.ChoiceFilter(\n        label=\"State\",\n        choices=((\"no_d\", \"Pending or accepted\"),) + TrainingRequest.STATE_CHOICES,\n        method=\"filter_training_requests_by_state\",\n    )\n\n    matched = django_filters.ChoiceFilter(\n        label=\"Is Matched?\",\n        choices=(\n            (\"\", \"Unknown\"),\n            (\"u\", \"Unmatched\"),\n            (\"p\", \"Matched trainee, unmatched training\"),\n            (\"t\", \"Matched trainee and training\"),\n        ),\n        method=\"filter_matched\",\n    )\n\n    nonnull_manual_score = django_filters.BooleanFilter(\n        label=\"Manual score applied\",\n        method=\"filter_non_null_manual_score\",\n        widget=widgets.CheckboxInput,\n    )\n\n    affiliation = django_filters.CharFilter(\n        method=\"filter_affiliation\",\n    )\n\n    location = django_filters.CharFilter(lookup_expr=\"icontains\")\n\n    order_by = NamesOrderingFilter(\n        fields=(\n            \"created_at\",\n            \"score_total\",\n        ),\n    )\n\n    class Meta:\n        model = TrainingRequest\n        fields = [\n            \"search\",\n            \"group_name\",\n            \"state\",\n            \"matched\",\n            \"affiliation\",\n            \"location\",\n        ]\n\n    def filter_matched(self, queryset, name, choice):\n        if choice == \"\":\n            return queryset\n        elif choice == \"u\":  # unmatched\n            return queryset.filter(person=None)\n        elif choice == \"p\":  # matched trainee, unmatched training\n            return (\n                queryset.filter(person__isnull=False)\n                .exclude(\n                    person__task__role__name=\"learner\",\n                    person__task__event__tags__name=\"TTT\",\n                )\n                .distinct()\n            )\n        else:  # choice == 't' <==> matched trainee and training\n            return queryset.filter(\n                person__task__role__name=\"learner\",\n                person__task__event__tags__name=\"TTT\",\n            ).distinct()\n\n    def filter_by_person(self, queryset, name, value):\n        if value == \"\":\n            return queryset\n        else:\n            # 'Harry Potter' -> ['Harry', 'Potter']\n            tokens = re.split(r\"\\s+\", value)\n            # Each token must match email address or github username or\n            # personal, or family name.\n            for token in tokens:\n                queryset = queryset.filter(\n                    Q(personal__icontains=token)\n                    | Q(middle__icontains=token)\n                    | Q(family__icontains=token)\n                    | Q(email__icontains=token)\n                    | Q(person__personal__icontains=token)\n                    | Q(person__middle__icontains=token)\n                    | Q(person__family__icontains=token)\n                    | Q(person__email__icontains=token)\n                )\n            return queryset\n\n    def filter_affiliation(self, queryset, name, affiliation):\n        if affiliation == \"\":\n            return queryset\n        else:\n            q = Q(affiliation__icontains=affiliation) | Q(\n                person__affiliation__icontains=affiliation\n            )\n            return queryset.filter(q).distinct()\n\n    def filter_training_requests_by_state(self, queryset, name, choice):\n        if choice == \"no_d\":\n            return queryset.exclude(state=\"d\")\n        else:\n            return queryset.filter(state=choice)\n\n    def filter_non_null_manual_score(self, queryset, name, manual_score):\n        if manual_score:\n            return queryset.filter(score_manual__isnull=False)\n        return queryset\n\n\n# ------------------------------------------------------------\n# WorkshopRequest related filter and filter methods\n# ------------------------------------------------------------\n\n\nclass WorkshopRequestFilter(AMYFilterSet, StateFilterSet):\n    assigned_to = ForeignKeyAllValuesFilter(Person, widget=Select2Widget)\n    country = AllCountriesFilter(widget=Select2Widget)\n    continent = ContinentFilter(widget=Select2Widget, label=\"Continent\")\n    requested_workshop_types = django_filters.ModelMultipleChoiceFilter(\n        label=\"Requested workshop types\",\n        queryset=Curriculum.objects.all(),\n        widget=widgets.CheckboxSelectMultiple(),\n    )\n\n    order_by = django_filters.OrderingFilter(\n        fields=(\"created_at\",),\n    )\n\n    class Meta:\n        model = WorkshopRequest\n        fields = [\n            \"state\",\n            \"assigned_to\",\n            \"requested_workshop_types\",\n            \"country\",\n        ]\n\n\n# ------------------------------------------------------------\n# WorkshopInquiryRequest related filter and filter methods\n# ------------------------------------------------------------\n\n\nclass WorkshopInquiryFilter(AMYFilterSet, StateFilterSet):\n    assigned_to = ForeignKeyAllValuesFilter(Person, widget=Select2Widget)\n    country = AllCountriesFilter(widget=Select2Widget)\n    continent = ContinentFilter(widget=Select2Widget, label=\"Continent\")\n    requested_workshop_types = django_filters.ModelMultipleChoiceFilter(\n        label=\"Requested workshop types\",\n        queryset=Curriculum.objects.all(),\n        widget=widgets.CheckboxSelectMultiple(),\n    )\n\n    order_by = django_filters.OrderingFilter(\n        fields=(\"created_at\",),\n    )\n\n    class Meta:\n        model = WorkshopInquiryRequest\n        fields = [\n            \"state\",\n            \"assigned_to\",\n            \"requested_workshop_types\",\n            \"country\",\n        ]\n\n\n# ------------------------------------------------------------\n# SelfOrganisedSubmission related filter and filter methods\n# ------------------------------------------------------------\n\n\nclass SelfOrganisedSubmissionFilter(AMYFilterSet, StateFilterSet):\n    assigned_to = ForeignKeyAllValuesFilter(Person, widget=Select2Widget)\n    country = AllCountriesFilter(widget=Select2Widget)\n    continent = ContinentFilter(widget=Select2Widget, label=\"Continent\")\n    workshop_types = django_filters.ModelMultipleChoiceFilter(\n        label=\"Requested workshop types\",\n        queryset=Curriculum.objects.all(),\n        widget=widgets.CheckboxSelectMultiple(),\n    )\n\n    order_by = django_filters.OrderingFilter(\n        fields=(\"created_at\",),\n    )\n\n    class Meta:\n        model = SelfOrganisedSubmission\n        fields = [\n            \"state\",\n            \"assigned_to\",\n            \"workshop_types\",\n            \"workshop_format\",\n        ]\n", "path": "amy/extrequests/filters.py"}], "after_files": [{"content": "import re\n\nfrom django.db.models import Q\nfrom django.forms import widgets\nfrom django.http import QueryDict\nimport django_filters\n\nfrom extrequests.models import SelfOrganisedSubmission, WorkshopInquiryRequest\nfrom workshops.fields import Select2Widget\nfrom workshops.filters import (\n    AllCountriesFilter,\n    AMYFilterSet,\n    ContinentFilter,\n    ForeignKeyAllValuesFilter,\n    NamesOrderingFilter,\n    StateFilterSet,\n)\nfrom workshops.models import Curriculum, Person, TrainingRequest, WorkshopRequest\n\n# ------------------------------------------------------------\n# TrainingRequest related filter and filter methods\n# ------------------------------------------------------------\n\n\nclass TrainingRequestFilter(AMYFilterSet):\n    def __init__(self, data=None, *args, **kwargs):\n        # If no filters are set, use some default settings.\n        # This avoids handling the full list of training requests\n        # client-side unless the user deliberately chooses to do so.\n        # See https://github.com/carpentries/amy/issues/2314\n        if not data:\n            data = QueryDict(\"state=no_d&matched=u\")\n\n        super().__init__(data, *args, **kwargs)\n\n    search = django_filters.CharFilter(\n        label=\"Name or Email\",\n        method=\"filter_by_person\",\n    )\n\n    group_name = django_filters.CharFilter(\n        field_name=\"group_name\", lookup_expr=\"icontains\", label=\"Group\"\n    )\n\n    state = django_filters.ChoiceFilter(\n        label=\"State\",\n        choices=((\"no_d\", \"Pending or accepted\"),) + TrainingRequest.STATE_CHOICES,\n        method=\"filter_training_requests_by_state\",\n    )\n\n    matched = django_filters.ChoiceFilter(\n        label=\"Is Matched?\",\n        choices=(\n            (\"\", \"Unknown\"),\n            (\"u\", \"Unmatched\"),\n            (\"p\", \"Matched trainee, unmatched training\"),\n            (\"t\", \"Matched trainee and training\"),\n        ),\n        method=\"filter_matched\",\n    )\n\n    nonnull_manual_score = django_filters.BooleanFilter(\n        label=\"Manual score applied\",\n        method=\"filter_non_null_manual_score\",\n        widget=widgets.CheckboxInput,\n    )\n\n    affiliation = django_filters.CharFilter(\n        method=\"filter_affiliation\",\n    )\n\n    location = django_filters.CharFilter(lookup_expr=\"icontains\")\n\n    order_by = NamesOrderingFilter(\n        fields=(\n            \"created_at\",\n            \"score_total\",\n        ),\n    )\n\n    class Meta:\n        model = TrainingRequest\n        fields = [\n            \"search\",\n            \"group_name\",\n            \"state\",\n            \"matched\",\n            \"affiliation\",\n            \"location\",\n        ]\n\n    def filter_matched(self, queryset, name, choice):\n        if choice == \"\":\n            return queryset\n        elif choice == \"u\":  # unmatched\n            return queryset.filter(person=None)\n        elif choice == \"p\":  # matched trainee, unmatched training\n            return (\n                queryset.filter(person__isnull=False)\n                .exclude(\n                    person__task__role__name=\"learner\",\n                    person__task__event__tags__name=\"TTT\",\n                )\n                .distinct()\n            )\n        else:  # choice == 't' <==> matched trainee and training\n            return queryset.filter(\n                person__task__role__name=\"learner\",\n                person__task__event__tags__name=\"TTT\",\n            ).distinct()\n\n    def filter_by_person(self, queryset, name, value):\n        if value == \"\":\n            return queryset\n        else:\n            # 'Harry Potter' -> ['Harry', 'Potter']\n            tokens = re.split(r\"\\s+\", value)\n            # Each token must match email address or github username or\n            # personal, or family name.\n            for token in tokens:\n                queryset = queryset.filter(\n                    Q(personal__icontains=token)\n                    | Q(middle__icontains=token)\n                    | Q(family__icontains=token)\n                    | Q(email__icontains=token)\n                    | Q(person__personal__icontains=token)\n                    | Q(person__middle__icontains=token)\n                    | Q(person__family__icontains=token)\n                    | Q(person__email__icontains=token)\n                )\n            return queryset\n\n    def filter_affiliation(self, queryset, name, affiliation):\n        if affiliation == \"\":\n            return queryset\n        else:\n            q = Q(affiliation__icontains=affiliation) | Q(\n                person__affiliation__icontains=affiliation\n            )\n            return queryset.filter(q).distinct()\n\n    def filter_training_requests_by_state(self, queryset, name, choice):\n        if choice == \"no_d\":\n            return queryset.exclude(state=\"d\")\n        else:\n            return queryset.filter(state=choice)\n\n    def filter_non_null_manual_score(self, queryset, name, manual_score):\n        if manual_score:\n            return queryset.filter(score_manual__isnull=False)\n        return queryset\n\n\n# ------------------------------------------------------------\n# WorkshopRequest related filter and filter methods\n# ------------------------------------------------------------\n\n\nclass WorkshopRequestFilter(AMYFilterSet, StateFilterSet):\n    assigned_to = ForeignKeyAllValuesFilter(Person, widget=Select2Widget)\n    country = AllCountriesFilter(widget=Select2Widget)\n    continent = ContinentFilter(widget=Select2Widget, label=\"Continent\")\n    requested_workshop_types = django_filters.ModelMultipleChoiceFilter(\n        label=\"Requested workshop types\",\n        queryset=Curriculum.objects.all(),\n        widget=widgets.CheckboxSelectMultiple(),\n    )\n\n    order_by = django_filters.OrderingFilter(\n        fields=(\"created_at\",),\n    )\n\n    class Meta:\n        model = WorkshopRequest\n        fields = [\n            \"state\",\n            \"assigned_to\",\n            \"requested_workshop_types\",\n            \"country\",\n        ]\n\n\n# ------------------------------------------------------------\n# WorkshopInquiryRequest related filter and filter methods\n# ------------------------------------------------------------\n\n\nclass WorkshopInquiryFilter(AMYFilterSet, StateFilterSet):\n    assigned_to = ForeignKeyAllValuesFilter(Person, widget=Select2Widget)\n    country = AllCountriesFilter(widget=Select2Widget)\n    continent = ContinentFilter(widget=Select2Widget, label=\"Continent\")\n    requested_workshop_types = django_filters.ModelMultipleChoiceFilter(\n        label=\"Requested workshop types\",\n        queryset=Curriculum.objects.all(),\n        widget=widgets.CheckboxSelectMultiple(),\n    )\n\n    order_by = django_filters.OrderingFilter(\n        fields=(\"created_at\",),\n    )\n\n    class Meta:\n        model = WorkshopInquiryRequest\n        fields = [\n            \"state\",\n            \"assigned_to\",\n            \"requested_workshop_types\",\n            \"country\",\n        ]\n\n\n# ------------------------------------------------------------\n# SelfOrganisedSubmission related filter and filter methods\n# ------------------------------------------------------------\n\n\nclass SelfOrganisedSubmissionFilter(AMYFilterSet, StateFilterSet):\n    assigned_to = ForeignKeyAllValuesFilter(Person, widget=Select2Widget)\n    country = AllCountriesFilter(widget=Select2Widget)\n    continent = ContinentFilter(widget=Select2Widget, label=\"Continent\")\n    workshop_types = django_filters.ModelMultipleChoiceFilter(\n        label=\"Requested workshop types\",\n        queryset=Curriculum.objects.all(),\n        widget=widgets.CheckboxSelectMultiple(),\n    )\n\n    order_by = django_filters.OrderingFilter(\n        fields=(\"created_at\",),\n    )\n\n    class Meta:\n        model = SelfOrganisedSubmission\n        fields = [\n            \"state\",\n            \"assigned_to\",\n            \"workshop_types\",\n            \"workshop_format\",\n        ]\n", "path": "amy/extrequests/filters.py"}]}