We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Country is not stored in db on signup
When a user signs up the country is not stored in the db


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `django/profiles/forms.py`
Content:
```
1 from django import forms
2 from django.utils.translation import ugettext_lazy as _
3 from django_countries.countries import COUNTRIES
4 
5 from userena.forms import SignupForm
6 
7 class SignupFormExtra(SignupForm):
8     institution = forms.CharField(label=_(u'Institution'),
9             max_length = 100,
10             required = True,
11             help_text=_(u'Institution you are affiliated to.'))
12     department = forms.CharField(label=_(u'Department'),
13             max_length = 100,
14             required = True,
15             help_text=_(u'Department you represent.'))
16     country = forms.ChoiceField(label=_(u'Country'),
17             choices=COUNTRIES,
18             required = True)
19     website = forms.CharField(label=_(u'Website'),
20             max_length = 150,
21             required = False)
22     first_name = forms.CharField(label=_(u'First Name'),
23             max_length = 30,
24             required = True)
25     last_name = forms.CharField(label=_(u'Last Name'),
26             max_length = 30,
27             required = True)
28 
29     def __init__(self, *args, **kw):
30         """ Bit of hackery to get the first and last name at the top of the form.
31         """
32         super(SignupFormExtra,self).__init__(*args,**kw)
33         # Put the first and last name at the top.
34         new_order = self.fields.keyOrder[:-2]
35         new_order.insert(0, 'first_name')
36         new_order.insert(1, 'last_name')
37         self.fields.keyOrder = new_order
38 
39     def save(self):
40         user = super(SignupFormExtra,self).save()
41         user.first_name = self.cleaned_data['first_name']
42         user.last_name = self.cleaned_data['last_name']
43         user.save()
44         user_profile = user.get_profile()
45         user_profile.institution = self.cleaned_data['institution']
46         user_profile.department = self.cleaned_data['department']
47         user_profile.save()
48 
49         return user
50
```
--- 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/django/profiles/forms.py b/django/profiles/forms.py
--- a/django/profiles/forms.py
+++ b/django/profiles/forms.py
@@ -44,6 +44,7 @@
         user_profile = user.get_profile()
         user_profile.institution = self.cleaned_data['institution']
         user_profile.department = self.cleaned_data['department']
+        user_profile.country = self.cleaned_data['country']
         user_profile.save()
 
         return user

{"golden_diff": "diff --git a/django/profiles/forms.py b/django/profiles/forms.py\n--- a/django/profiles/forms.py\n+++ b/django/profiles/forms.py\n@@ -44,6 +44,7 @@\n         user_profile = user.get_profile()\n         user_profile.institution = self.cleaned_data['institution']\n         user_profile.department = self.cleaned_data['department']\n+        user_profile.country = self.cleaned_data['country']\n         user_profile.save()\n \n         return user\n", "issue": "Country is not stored in db on signup\nWhen a user signs up the country is not stored in the db\n\n", "before_files": [{"content": "from django import forms\nfrom django.utils.translation import ugettext_lazy as _\nfrom django_countries.countries import COUNTRIES\n\nfrom userena.forms import SignupForm\n\nclass SignupFormExtra(SignupForm):\n    institution = forms.CharField(label=_(u'Institution'),\n            max_length = 100,\n            required = True,\n            help_text=_(u'Institution you are affiliated to.'))\n    department = forms.CharField(label=_(u'Department'),\n            max_length = 100,\n            required = True,\n            help_text=_(u'Department you represent.'))\n    country = forms.ChoiceField(label=_(u'Country'),\n            choices=COUNTRIES,\n            required = True)\n    website = forms.CharField(label=_(u'Website'),\n            max_length = 150,\n            required = False)\n    first_name = forms.CharField(label=_(u'First Name'),\n            max_length = 30,\n            required = True)\n    last_name = forms.CharField(label=_(u'Last Name'),\n            max_length = 30,\n            required = True)\n\n    def __init__(self, *args, **kw):\n        \"\"\" Bit of hackery to get the first and last name at the top of the form.\n        \"\"\"\n        super(SignupFormExtra,self).__init__(*args,**kw)\n        # Put the first and last name at the top.\n        new_order = self.fields.keyOrder[:-2]\n        new_order.insert(0, 'first_name')\n        new_order.insert(1, 'last_name')\n        self.fields.keyOrder = new_order\n\n    def save(self):\n        user = super(SignupFormExtra,self).save()\n        user.first_name = self.cleaned_data['first_name']\n        user.last_name = self.cleaned_data['last_name']\n        user.save()\n        user_profile = user.get_profile()\n        user_profile.institution = self.cleaned_data['institution']\n        user_profile.department = self.cleaned_data['department']\n        user_profile.save()\n\n        return user\n", "path": "django/profiles/forms.py"}], "after_files": [{"content": "from django import forms\nfrom django.utils.translation import ugettext_lazy as _\nfrom django_countries.countries import COUNTRIES\n\nfrom userena.forms import SignupForm\n\nclass SignupFormExtra(SignupForm):\n    institution = forms.CharField(label=_(u'Institution'),\n            max_length = 100,\n            required = True,\n            help_text=_(u'Institution you are affiliated to.'))\n    department = forms.CharField(label=_(u'Department'),\n            max_length = 100,\n            required = True,\n            help_text=_(u'Department you represent.'))\n    country = forms.ChoiceField(label=_(u'Country'),\n            choices=COUNTRIES,\n            required = True)\n    website = forms.CharField(label=_(u'Website'),\n            max_length = 150,\n            required = False)\n    first_name = forms.CharField(label=_(u'First Name'),\n            max_length = 30,\n            required = True)\n    last_name = forms.CharField(label=_(u'Last Name'),\n            max_length = 30,\n            required = True)\n\n    def __init__(self, *args, **kw):\n        \"\"\" Bit of hackery to get the first and last name at the top of the form.\n        \"\"\"\n        super(SignupFormExtra,self).__init__(*args,**kw)\n        # Put the first and last name at the top.\n        new_order = self.fields.keyOrder[:-2]\n        new_order.insert(0, 'first_name')\n        new_order.insert(1, 'last_name')\n        self.fields.keyOrder = new_order\n\n    def save(self):\n        user = super(SignupFormExtra,self).save()\n        user.first_name = self.cleaned_data['first_name']\n        user.last_name = self.cleaned_data['last_name']\n        user.save()\n        user_profile = user.get_profile()\n        user_profile.institution = self.cleaned_data['institution']\n        user_profile.department = self.cleaned_data['department']\n        user_profile.country = self.cleaned_data['country']\n        user_profile.save()\n\n        return user\n", "path": "django/profiles/forms.py"}]}