We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Annual documents does not show drop-down menu for year
### Describe the bug

When I try to add an annual document to the site, I am not able to select a year, the dropdown menu does not contain any entries. 

### Steps to reproduce

1. 

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `website/documents/forms.py`
Content:
```
1 """The forms defined by the documents package."""
2 from django import forms
3 from django.contrib import admin
4 from django.forms import widgets
5 from django.utils import timezone
6 
7 from documents import models
8 from utils.snippets import datetime_to_lectureyear
9 
10 
11 class DocumentFileInput(widgets.ClearableFileInput):
12     """Wrapper around Django's :class:`~django.forms.widgets.ClearableFileInput`.
13 
14     It overrides the URL of the associated file when it is fetched.
15     """
16 
17     template_name = "widgets/clearable_file_input.html"
18 
19     def get_context(self, name, value, attrs):
20         context = super().get_context(name, value, attrs)
21         if hasattr(value, "url"):
22             doc = models.Document.objects.get(file=value)
23             context["document_id"] = doc.pk
24             context["language"] = "en"
25         return context
26 
27 
28 class MinutesForm(forms.ModelForm):
29     """Form that overrides the widgets for the files."""
30 
31     class Meta:
32         model = models.Minutes
33         fields = (
34             "file",
35             "members_only",
36         )
37         widgets = {
38             "file": DocumentFileInput,
39         }
40 
41 
42 class AnnualDocumentForm(forms.ModelForm):
43     """Form that provides custom functionality for annual documents."""
44 
45     class Meta:
46         model = models.AnnualDocument
47         fields = "__all__"
48         widgets = {
49             "year": forms.Select,
50             "file": DocumentFileInput,
51         }
52 
53     @staticmethod
54     def _current_year():
55         """Get the current lecture year."""
56         return datetime_to_lectureyear(timezone.now())
57 
58     @staticmethod
59     def _year_choices():
60         """Get the lecture years."""
61         current = datetime_to_lectureyear(timezone.now())
62         return [
63             (year, "{}-{}".format(year, year + 1))
64             for year in range(current + 1, 1989, -1)
65         ]
66 
67 
68 class AssociationDocumentForm(forms.ModelForm):
69     """Form that overrides the widgets for the files."""
70 
71     class Meta:
72         model = models.AssociationDocument
73         fields = (
74             "name",
75             "file",
76             "members_only",
77         )
78         widgets = {
79             "file": DocumentFileInput,
80         }
81 
82 
83 class EventDocumentForm(forms.ModelForm):
84     """Form that overrides the widgets for the files."""
85 
86     class Meta:
87         model = models.EventDocument
88         fields = (
89             "name",
90             "file",
91             "members_only",
92             "owner",
93         )
94         widgets = {
95             "file": DocumentFileInput,
96         }
97 
98 
99 class MiscellaneousDocumentForm(forms.ModelForm):
100     """Form that overrides the widgets for the files."""
101 
102     class Meta:
103         model = models.MiscellaneousDocument
104         fields = (
105             "name",
106             "file",
107             "members_only",
108         )
109         widgets = {
110             "file": DocumentFileInput,
111         }
112 
113 
114 class GeneralMeetingForm(forms.ModelForm):
115     """Custom form for general meetings with a custom widget for documents."""
116 
117     class Meta:
118         model = models.GeneralMeeting
119         fields = "__all__"
120         widgets = {
121             "documents": admin.widgets.FilteredSelectMultiple(
122                 "documents", is_stacked=False
123             )
124         }
125
```
--- 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/website/documents/forms.py b/website/documents/forms.py
--- a/website/documents/forms.py
+++ b/website/documents/forms.py
@@ -64,6 +64,10 @@
             for year in range(current + 1, 1989, -1)
         ]
 
+    year = forms.TypedChoiceField(
+        coerce=int, choices=_year_choices.__func__, initial=_current_year.__func__
+    )
+
 
 class AssociationDocumentForm(forms.ModelForm):
     """Form that overrides the widgets for the files."""

{"golden_diff": "diff --git a/website/documents/forms.py b/website/documents/forms.py\n--- a/website/documents/forms.py\n+++ b/website/documents/forms.py\n@@ -64,6 +64,10 @@\n             for year in range(current + 1, 1989, -1)\n         ]\n \n+    year = forms.TypedChoiceField(\n+        coerce=int, choices=_year_choices.__func__, initial=_current_year.__func__\n+    )\n+\n \n class AssociationDocumentForm(forms.ModelForm):\n     \"\"\"Form that overrides the widgets for the files.\"\"\"\n", "issue": "Annual documents does not show drop-down menu for year\n### Describe the bug\r\n\r\nWhen I try to add an annual document to the site, I am not able to select a year, the dropdown menu does not contain any entries. \r\n\r\n### Steps to reproduce\r\n\r\n1. \n", "before_files": [{"content": "\"\"\"The forms defined by the documents package.\"\"\"\nfrom django import forms\nfrom django.contrib import admin\nfrom django.forms import widgets\nfrom django.utils import timezone\n\nfrom documents import models\nfrom utils.snippets import datetime_to_lectureyear\n\n\nclass DocumentFileInput(widgets.ClearableFileInput):\n    \"\"\"Wrapper around Django's :class:`~django.forms.widgets.ClearableFileInput`.\n\n    It overrides the URL of the associated file when it is fetched.\n    \"\"\"\n\n    template_name = \"widgets/clearable_file_input.html\"\n\n    def get_context(self, name, value, attrs):\n        context = super().get_context(name, value, attrs)\n        if hasattr(value, \"url\"):\n            doc = models.Document.objects.get(file=value)\n            context[\"document_id\"] = doc.pk\n            context[\"language\"] = \"en\"\n        return context\n\n\nclass MinutesForm(forms.ModelForm):\n    \"\"\"Form that overrides the widgets for the files.\"\"\"\n\n    class Meta:\n        model = models.Minutes\n        fields = (\n            \"file\",\n            \"members_only\",\n        )\n        widgets = {\n            \"file\": DocumentFileInput,\n        }\n\n\nclass AnnualDocumentForm(forms.ModelForm):\n    \"\"\"Form that provides custom functionality for annual documents.\"\"\"\n\n    class Meta:\n        model = models.AnnualDocument\n        fields = \"__all__\"\n        widgets = {\n            \"year\": forms.Select,\n            \"file\": DocumentFileInput,\n        }\n\n    @staticmethod\n    def _current_year():\n        \"\"\"Get the current lecture year.\"\"\"\n        return datetime_to_lectureyear(timezone.now())\n\n    @staticmethod\n    def _year_choices():\n        \"\"\"Get the lecture years.\"\"\"\n        current = datetime_to_lectureyear(timezone.now())\n        return [\n            (year, \"{}-{}\".format(year, year + 1))\n            for year in range(current + 1, 1989, -1)\n        ]\n\n\nclass AssociationDocumentForm(forms.ModelForm):\n    \"\"\"Form that overrides the widgets for the files.\"\"\"\n\n    class Meta:\n        model = models.AssociationDocument\n        fields = (\n            \"name\",\n            \"file\",\n            \"members_only\",\n        )\n        widgets = {\n            \"file\": DocumentFileInput,\n        }\n\n\nclass EventDocumentForm(forms.ModelForm):\n    \"\"\"Form that overrides the widgets for the files.\"\"\"\n\n    class Meta:\n        model = models.EventDocument\n        fields = (\n            \"name\",\n            \"file\",\n            \"members_only\",\n            \"owner\",\n        )\n        widgets = {\n            \"file\": DocumentFileInput,\n        }\n\n\nclass MiscellaneousDocumentForm(forms.ModelForm):\n    \"\"\"Form that overrides the widgets for the files.\"\"\"\n\n    class Meta:\n        model = models.MiscellaneousDocument\n        fields = (\n            \"name\",\n            \"file\",\n            \"members_only\",\n        )\n        widgets = {\n            \"file\": DocumentFileInput,\n        }\n\n\nclass GeneralMeetingForm(forms.ModelForm):\n    \"\"\"Custom form for general meetings with a custom widget for documents.\"\"\"\n\n    class Meta:\n        model = models.GeneralMeeting\n        fields = \"__all__\"\n        widgets = {\n            \"documents\": admin.widgets.FilteredSelectMultiple(\n                \"documents\", is_stacked=False\n            )\n        }\n", "path": "website/documents/forms.py"}], "after_files": [{"content": "\"\"\"The forms defined by the documents package.\"\"\"\nfrom django import forms\nfrom django.contrib import admin\nfrom django.forms import widgets\nfrom django.utils import timezone\n\nfrom documents import models\nfrom utils.snippets import datetime_to_lectureyear\n\n\nclass DocumentFileInput(widgets.ClearableFileInput):\n    \"\"\"Wrapper around Django's :class:`~django.forms.widgets.ClearableFileInput`.\n\n    It overrides the URL of the associated file when it is fetched.\n    \"\"\"\n\n    template_name = \"widgets/clearable_file_input.html\"\n\n    def get_context(self, name, value, attrs):\n        context = super().get_context(name, value, attrs)\n        if hasattr(value, \"url\"):\n            doc = models.Document.objects.get(file=value)\n            context[\"document_id\"] = doc.pk\n            context[\"language\"] = \"en\"\n        return context\n\n\nclass MinutesForm(forms.ModelForm):\n    \"\"\"Form that overrides the widgets for the files.\"\"\"\n\n    class Meta:\n        model = models.Minutes\n        fields = (\n            \"file\",\n            \"members_only\",\n        )\n        widgets = {\n            \"file\": DocumentFileInput,\n        }\n\n\nclass AnnualDocumentForm(forms.ModelForm):\n    \"\"\"Form that provides custom functionality for annual documents.\"\"\"\n\n    class Meta:\n        model = models.AnnualDocument\n        fields = \"__all__\"\n        widgets = {\n            \"year\": forms.Select,\n            \"file\": DocumentFileInput,\n        }\n\n    @staticmethod\n    def _current_year():\n        \"\"\"Get the current lecture year.\"\"\"\n        return datetime_to_lectureyear(timezone.now())\n\n    @staticmethod\n    def _year_choices():\n        \"\"\"Get the lecture years.\"\"\"\n        current = datetime_to_lectureyear(timezone.now())\n        return [\n            (year, \"{}-{}\".format(year, year + 1))\n            for year in range(current + 1, 1989, -1)\n        ]\n\n    year = forms.TypedChoiceField(\n        coerce=int, choices=_year_choices.__func__, initial=_current_year.__func__\n    )\n\n\nclass AssociationDocumentForm(forms.ModelForm):\n    \"\"\"Form that overrides the widgets for the files.\"\"\"\n\n    class Meta:\n        model = models.AssociationDocument\n        fields = (\n            \"name\",\n            \"file\",\n            \"members_only\",\n        )\n        widgets = {\n            \"file\": DocumentFileInput,\n        }\n\n\nclass EventDocumentForm(forms.ModelForm):\n    \"\"\"Form that overrides the widgets for the files.\"\"\"\n\n    class Meta:\n        model = models.EventDocument\n        fields = (\n            \"name\",\n            \"file\",\n            \"members_only\",\n            \"owner\",\n        )\n        widgets = {\n            \"file\": DocumentFileInput,\n        }\n\n\nclass MiscellaneousDocumentForm(forms.ModelForm):\n    \"\"\"Form that overrides the widgets for the files.\"\"\"\n\n    class Meta:\n        model = models.MiscellaneousDocument\n        fields = (\n            \"name\",\n            \"file\",\n            \"members_only\",\n        )\n        widgets = {\n            \"file\": DocumentFileInput,\n        }\n\n\nclass GeneralMeetingForm(forms.ModelForm):\n    \"\"\"Custom form for general meetings with a custom widget for documents.\"\"\"\n\n    class Meta:\n        model = models.GeneralMeeting\n        fields = \"__all__\"\n        widgets = {\n            \"documents\": admin.widgets.FilteredSelectMultiple(\n                \"documents\", is_stacked=False\n            )\n        }\n", "path": "website/documents/forms.py"}]}