We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Registration form needs help text
To be a valid online user the user must register with their student emails. This is not indicated in the registration form.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `apps/authentication/forms.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 
3 import datetime
4 import re
5 
6 from django import forms
7 from django.contrib import auth
8 from django.utils.translation import ugettext as _
9 
10 from apps.authentication.models import OnlineUser as User, Email
11 
12 class LoginForm(forms.Form):
13     username = forms.CharField(widget=forms.TextInput(), label=_("Brukernavn"), max_length=50)
14     password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_(u"Passord"))
15     user = None
16 
17     def clean(self):
18         if self._errors:
19             return
20     
21         user = auth.authenticate(username=self.cleaned_data['username'], password=self.cleaned_data['password'])
22 
23         if user:
24             if user.is_active:
25                 self.user = user
26             else:
27                 self._errors['username'] = self.error_class([_(u"Din konto er ikke aktiv. Forsøk gjenoppretning av passord.")])
28         else:
29             self._errors['username'] = self.error_class([_(u"Kontoen eksisterer ikke, eller kombinasjonen av brukernavn og passord er feil.")])
30         return self.cleaned_data
31 
32     def login(self, request):
33         try:
34             User.objects.get(username=request.POST['username'])
35         except:
36             return False
37         if self.is_valid():
38             auth.login(request, self.user)
39             return True
40         return False
41 
42 class RegisterForm(forms.Form):
43     username = forms.CharField(label=_("Brukernavn"), max_length=20)
44     first_name = forms.CharField(label=_("Fornavn"), max_length=50)
45     last_name = forms.CharField(label=_("Etternavn"), max_length=50)
46     email = forms.EmailField(label=_("Epost"), max_length=50)
47     password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_("Passord"))
48     repeat_password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_("Gjenta passord"))
49     address = forms.CharField(label=_("Adresse"), max_length=100, required=False)
50     zip_code = forms.CharField(label=_("Postnummer"), max_length=4, required=False)
51     phone = forms.CharField(label=_("Telefon"), max_length=20, required=False)
52     
53     def clean(self):
54         super(RegisterForm, self).clean()
55         if self.is_valid():
56             cleaned_data = self.cleaned_data
57 
58             # Check passwords
59             if cleaned_data['password'] != cleaned_data['repeat_password']:
60                 self._errors['repeat_password'] = self.error_class([_(u"Passordene er ikke like.")])
61 
62             # Check username
63             username = cleaned_data['username']
64             if User.objects.filter(username=username).count() > 0:
65                 self._errors['username'] = self.error_class([_(u"Brukernavnet er allerede registrert.")])
66             if not re.match("^[a-zA-Z0-9_-]+$", username):
67                 self._errors['username'] = self.error_class([_(u"Ditt brukernavn inneholdt ulovlige tegn. Lovlige tegn: a-Z 0-9 - _")])
68 
69             # Check email
70             email = cleaned_data['email'].lower()
71             if Email.objects.filter(email=email).count() > 0:
72                 self._errors['email'] = self.error_class([_(u"Det fins allerede en bruker med denne epostadressen.")])
73 
74             # ZIP code digits only
75             zip_code = cleaned_data['zip_code']
76             if len(zip_code) != 0:
77                 if len(zip_code) != 4 or not zip_code.isdigit():
78                     self._errors['zip_code'] = self.error_class([_(u"Postnummer må bestå av fire siffer.")])
79 
80             return cleaned_data 
81 
82 class RecoveryForm(forms.Form):
83     email = forms.EmailField(label="Email", max_length=50)
84 
85 class ChangePasswordForm(forms.Form):
86     new_password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_(u"Nytt passord"))
87     repeat_password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_(u"Gjenta passord"))
88 
89     def clean(self):
90         super(ChangePasswordForm, self).clean()
91         if self.is_valid():
92             cleaned_data = self.cleaned_data
93 
94             # Check passwords
95             if cleaned_data['new_password'] != cleaned_data['repeat_password']:
96                 self._errors['repeat_password'] = self.error_class([_(u"Passordene er ikke like.")])
97 
98             return cleaned_data
99 
100 
101 class NewEmailForm(forms.Form):
102     new_email = forms.EmailField(label=_(u"ny epostadresse"))
103
```
--- 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/apps/authentication/forms.py b/apps/authentication/forms.py
--- a/apps/authentication/forms.py
+++ b/apps/authentication/forms.py
@@ -40,14 +40,14 @@
         return False
 
 class RegisterForm(forms.Form):
-    username = forms.CharField(label=_("Brukernavn"), max_length=20)
-    first_name = forms.CharField(label=_("Fornavn"), max_length=50)
+    username = forms.CharField(label=_("Brukernavn"), max_length=20, help_text=u'Valgfritt brukernavn')
+    first_name = forms.CharField(label=_("Fornavn"), max_length=50, help_text=u'Mellomnavn inkluderer du etter fornavnet ditt')
     last_name = forms.CharField(label=_("Etternavn"), max_length=50)
-    email = forms.EmailField(label=_("Epost"), max_length=50)
+    email = forms.EmailField(label=_("Epost"), max_length=50, help_text=u'Du kan legge til flere epostadresser senere i din profil.')
     password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_("Passord"))
     repeat_password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_("Gjenta passord"))
-    address = forms.CharField(label=_("Adresse"), max_length=100, required=False)
-    zip_code = forms.CharField(label=_("Postnummer"), max_length=4, required=False)
+    address = forms.CharField(label=_("Adresse"), max_length=100, required=False, widget=forms.Textarea(attrs={'rows':3}))
+    zip_code = forms.CharField(label=_("Postnummer"), max_length=4, required=False, help_text=u'Vi henter by basert på postnummer')
     phone = forms.CharField(label=_("Telefon"), max_length=20, required=False)
     
     def clean(self):

{"golden_diff": "diff --git a/apps/authentication/forms.py b/apps/authentication/forms.py\n--- a/apps/authentication/forms.py\n+++ b/apps/authentication/forms.py\n@@ -40,14 +40,14 @@\n         return False\n \n class RegisterForm(forms.Form):\n-    username = forms.CharField(label=_(\"Brukernavn\"), max_length=20)\n-    first_name = forms.CharField(label=_(\"Fornavn\"), max_length=50)\n+    username = forms.CharField(label=_(\"Brukernavn\"), max_length=20, help_text=u'Valgfritt brukernavn')\n+    first_name = forms.CharField(label=_(\"Fornavn\"), max_length=50, help_text=u'Mellomnavn inkluderer du etter fornavnet ditt')\n     last_name = forms.CharField(label=_(\"Etternavn\"), max_length=50)\n-    email = forms.EmailField(label=_(\"Epost\"), max_length=50)\n+    email = forms.EmailField(label=_(\"Epost\"), max_length=50, help_text=u'Du kan legge til flere epostadresser senere i din profil.')\n     password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_(\"Passord\"))\n     repeat_password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_(\"Gjenta passord\"))\n-    address = forms.CharField(label=_(\"Adresse\"), max_length=100, required=False)\n-    zip_code = forms.CharField(label=_(\"Postnummer\"), max_length=4, required=False)\n+    address = forms.CharField(label=_(\"Adresse\"), max_length=100, required=False, widget=forms.Textarea(attrs={'rows':3}))\n+    zip_code = forms.CharField(label=_(\"Postnummer\"), max_length=4, required=False, help_text=u'Vi henter by basert p\u00e5 postnummer')\n     phone = forms.CharField(label=_(\"Telefon\"), max_length=20, required=False)\n     \n     def clean(self):\n", "issue": "Registration form needs help text\nTo be a valid online user the user must register with their student emails. This is not indicated in the registration form.\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\nimport datetime\nimport re\n\nfrom django import forms\nfrom django.contrib import auth\nfrom django.utils.translation import ugettext as _\n\nfrom apps.authentication.models import OnlineUser as User, Email\n\nclass LoginForm(forms.Form):\n    username = forms.CharField(widget=forms.TextInput(), label=_(\"Brukernavn\"), max_length=50)\n    password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_(u\"Passord\"))\n    user = None\n\n    def clean(self):\n        if self._errors:\n            return\n    \n        user = auth.authenticate(username=self.cleaned_data['username'], password=self.cleaned_data['password'])\n\n        if user:\n            if user.is_active:\n                self.user = user\n            else:\n                self._errors['username'] = self.error_class([_(u\"Din konto er ikke aktiv. Fors\u00f8k gjenoppretning av passord.\")])\n        else:\n            self._errors['username'] = self.error_class([_(u\"Kontoen eksisterer ikke, eller kombinasjonen av brukernavn og passord er feil.\")])\n        return self.cleaned_data\n\n    def login(self, request):\n        try:\n            User.objects.get(username=request.POST['username'])\n        except:\n            return False\n        if self.is_valid():\n            auth.login(request, self.user)\n            return True\n        return False\n\nclass RegisterForm(forms.Form):\n    username = forms.CharField(label=_(\"Brukernavn\"), max_length=20)\n    first_name = forms.CharField(label=_(\"Fornavn\"), max_length=50)\n    last_name = forms.CharField(label=_(\"Etternavn\"), max_length=50)\n    email = forms.EmailField(label=_(\"Epost\"), max_length=50)\n    password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_(\"Passord\"))\n    repeat_password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_(\"Gjenta passord\"))\n    address = forms.CharField(label=_(\"Adresse\"), max_length=100, required=False)\n    zip_code = forms.CharField(label=_(\"Postnummer\"), max_length=4, required=False)\n    phone = forms.CharField(label=_(\"Telefon\"), max_length=20, required=False)\n    \n    def clean(self):\n        super(RegisterForm, self).clean()\n        if self.is_valid():\n            cleaned_data = self.cleaned_data\n\n            # Check passwords\n            if cleaned_data['password'] != cleaned_data['repeat_password']:\n                self._errors['repeat_password'] = self.error_class([_(u\"Passordene er ikke like.\")])\n\n            # Check username\n            username = cleaned_data['username']\n            if User.objects.filter(username=username).count() > 0:\n                self._errors['username'] = self.error_class([_(u\"Brukernavnet er allerede registrert.\")])\n            if not re.match(\"^[a-zA-Z0-9_-]+$\", username):\n                self._errors['username'] = self.error_class([_(u\"Ditt brukernavn inneholdt ulovlige tegn. Lovlige tegn: a-Z 0-9 - _\")])\n\n            # Check email\n            email = cleaned_data['email'].lower()\n            if Email.objects.filter(email=email).count() > 0:\n                self._errors['email'] = self.error_class([_(u\"Det fins allerede en bruker med denne epostadressen.\")])\n\n            # ZIP code digits only\n            zip_code = cleaned_data['zip_code']\n            if len(zip_code) != 0:\n                if len(zip_code) != 4 or not zip_code.isdigit():\n                    self._errors['zip_code'] = self.error_class([_(u\"Postnummer m\u00e5 best\u00e5 av fire siffer.\")])\n\n            return cleaned_data \n\nclass RecoveryForm(forms.Form):\n    email = forms.EmailField(label=\"Email\", max_length=50)\n\nclass ChangePasswordForm(forms.Form):\n    new_password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_(u\"Nytt passord\"))\n    repeat_password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_(u\"Gjenta passord\"))\n\n    def clean(self):\n        super(ChangePasswordForm, self).clean()\n        if self.is_valid():\n            cleaned_data = self.cleaned_data\n\n            # Check passwords\n            if cleaned_data['new_password'] != cleaned_data['repeat_password']:\n                self._errors['repeat_password'] = self.error_class([_(u\"Passordene er ikke like.\")])\n\n            return cleaned_data\n\n\nclass NewEmailForm(forms.Form):\n    new_email = forms.EmailField(label=_(u\"ny epostadresse\"))\n", "path": "apps/authentication/forms.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\nimport datetime\nimport re\n\nfrom django import forms\nfrom django.contrib import auth\nfrom django.utils.translation import ugettext as _\n\nfrom apps.authentication.models import OnlineUser as User, Email\n\nclass LoginForm(forms.Form):\n    username = forms.CharField(widget=forms.TextInput(), label=_(\"Brukernavn\"), max_length=50)\n    password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_(u\"Passord\"))\n    user = None\n\n    def clean(self):\n        if self._errors:\n            return\n    \n        user = auth.authenticate(username=self.cleaned_data['username'], password=self.cleaned_data['password'])\n\n        if user:\n            if user.is_active:\n                self.user = user\n            else:\n                self._errors['username'] = self.error_class([_(u\"Din konto er ikke aktiv. Fors\u00f8k gjenoppretning av passord.\")])\n        else:\n            self._errors['username'] = self.error_class([_(u\"Kontoen eksisterer ikke, eller kombinasjonen av brukernavn og passord er feil.\")])\n        return self.cleaned_data\n\n    def login(self, request):\n        try:\n            User.objects.get(username=request.POST['username'])\n        except:\n            return False\n        if self.is_valid():\n            auth.login(request, self.user)\n            return True\n        return False\n\nclass RegisterForm(forms.Form):\n    username = forms.CharField(label=_(\"Brukernavn\"), max_length=20, help_text=u'Valgfritt brukernavn')\n    first_name = forms.CharField(label=_(\"Fornavn\"), max_length=50, help_text=u'Mellomnavn inkluderer du etter fornavnet ditt')\n    last_name = forms.CharField(label=_(\"Etternavn\"), max_length=50)\n    email = forms.EmailField(label=_(\"Epost\"), max_length=50, help_text=u'Du kan legge til flere epostadresser senere i din profil.')\n    password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_(\"Passord\"))\n    repeat_password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_(\"Gjenta passord\"))\n    address = forms.CharField(label=_(\"Adresse\"), max_length=100, required=False, widget=forms.Textarea(attrs={'rows':3}))\n    zip_code = forms.CharField(label=_(\"Postnummer\"), max_length=4, required=False, help_text=u'Vi henter by basert p\u00e5 postnummer')\n    phone = forms.CharField(label=_(\"Telefon\"), max_length=20, required=False)\n    \n    def clean(self):\n        super(RegisterForm, self).clean()\n        if self.is_valid():\n            cleaned_data = self.cleaned_data\n\n            # Check passwords\n            if cleaned_data['password'] != cleaned_data['repeat_password']:\n                self._errors['repeat_password'] = self.error_class([_(u\"Passordene er ikke like.\")])\n\n            # Check username\n            username = cleaned_data['username']\n            if User.objects.filter(username=username).count() > 0:\n                self._errors['username'] = self.error_class([_(u\"Brukernavnet er allerede registrert.\")])\n            if not re.match(\"^[a-zA-Z0-9_-]+$\", username):\n                self._errors['username'] = self.error_class([_(u\"Ditt brukernavn inneholdt ulovlige tegn. Lovlige tegn: a-Z 0-9 - _\")])\n\n            # Check email\n            email = cleaned_data['email'].lower()\n            if Email.objects.filter(email=email).count() > 0:\n                self._errors['email'] = self.error_class([_(u\"Det fins allerede en bruker med denne epostadressen.\")])\n\n            # ZIP code digits only\n            zip_code = cleaned_data['zip_code']\n            if len(zip_code) != 0:\n                if len(zip_code) != 4 or not zip_code.isdigit():\n                    self._errors['zip_code'] = self.error_class([_(u\"Postnummer m\u00e5 best\u00e5 av fire siffer.\")])\n\n            return cleaned_data \n\nclass RecoveryForm(forms.Form):\n    email = forms.EmailField(label=\"Email\", max_length=50)\n\nclass ChangePasswordForm(forms.Form):\n    new_password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_(u\"Nytt passord\"))\n    repeat_password = forms.CharField(widget=forms.PasswordInput(render_value=False), label=_(u\"Gjenta passord\"))\n\n    def clean(self):\n        super(ChangePasswordForm, self).clean()\n        if self.is_valid():\n            cleaned_data = self.cleaned_data\n\n            # Check passwords\n            if cleaned_data['new_password'] != cleaned_data['repeat_password']:\n                self._errors['repeat_password'] = self.error_class([_(u\"Passordene er ikke like.\")])\n\n            return cleaned_data\n\n\nclass NewEmailForm(forms.Form):\n    new_email = forms.EmailField(label=_(u\"ny epostadresse\"))\n", "path": "apps/authentication/forms.py"}]}