We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Change Mezzanine Form to Disallow Username Changes
**Describe the feature you'd like and what it will do**
The internal mezzanine form for the admin account should be altered to no longer allow username changes if possible, since doing so breaks the resource. 


**Why is this feature important?**
This will be policy moving forward, that usernames cannot be changed. 
I will work with Scott to see if this change is feasible. 


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `hs_core/admin.py`
Content:
```
1 from django import forms
2 from django.contrib.auth.admin import UserAdmin
3 from django.contrib.auth.forms import UserCreationForm
4 from django.contrib.gis import admin
5 from django.contrib.contenttypes.admin import GenericTabularInline
6 from django.utils.translation import ugettext_lazy as _
7 
8 from .models import *
9 
10 
11 class UserCreationFormExtended(UserCreationForm):
12     def __init__(self, *args, **kwargs):
13         super(UserCreationFormExtended, self).__init__(*args, **kwargs)
14         self.fields['email'] = forms.EmailField(label=_("E-mail"), max_length=75)
15 
16 UserAdmin.add_form = UserCreationFormExtended
17 UserAdmin.add_fieldsets = (
18     (None, {
19         'classes': ('wide',),
20         'fields': ('email', 'username', 'password1', 'password2',)
21     }),
22 )
23 UserAdmin.list_display = [
24     'username', 'email', 'first_name', 'last_name', 'is_staff',
25     'is_active', 'date_joined', 'last_login'
26 ]
27 
28 class InlineResourceFiles(GenericTabularInline):
29     model = ResourceFile
30 
31 admin.site.unregister(User)
32 admin.site.register(User, UserAdmin)
33 admin.site.unregister(GenericResource)
34
```
--- 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/hs_core/admin.py b/hs_core/admin.py
--- a/hs_core/admin.py
+++ b/hs_core/admin.py
@@ -14,6 +14,7 @@
         self.fields['email'] = forms.EmailField(label=_("E-mail"), max_length=75)
 
 UserAdmin.add_form = UserCreationFormExtended
+UserAdmin.readonly_fields = ('username',)
 UserAdmin.add_fieldsets = (
     (None, {
         'classes': ('wide',),

{"golden_diff": "diff --git a/hs_core/admin.py b/hs_core/admin.py\n--- a/hs_core/admin.py\n+++ b/hs_core/admin.py\n@@ -14,6 +14,7 @@\n         self.fields['email'] = forms.EmailField(label=_(\"E-mail\"), max_length=75)\n \n UserAdmin.add_form = UserCreationFormExtended\n+UserAdmin.readonly_fields = ('username',)\n UserAdmin.add_fieldsets = (\n     (None, {\n         'classes': ('wide',),\n", "issue": "Change Mezzanine Form to Disallow Username Changes\n**Describe the feature you'd like and what it will do**\r\nThe internal mezzanine form for the admin account should be altered to no longer allow username changes if possible, since doing so breaks the resource. \r\n\r\n\r\n**Why is this feature important?**\r\nThis will be policy moving forward, that usernames cannot be changed. \r\nI will work with Scott to see if this change is feasible. \r\n\n", "before_files": [{"content": "from django import forms\nfrom django.contrib.auth.admin import UserAdmin\nfrom django.contrib.auth.forms import UserCreationForm\nfrom django.contrib.gis import admin\nfrom django.contrib.contenttypes.admin import GenericTabularInline\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom .models import *\n\n\nclass UserCreationFormExtended(UserCreationForm):\n    def __init__(self, *args, **kwargs):\n        super(UserCreationFormExtended, self).__init__(*args, **kwargs)\n        self.fields['email'] = forms.EmailField(label=_(\"E-mail\"), max_length=75)\n\nUserAdmin.add_form = UserCreationFormExtended\nUserAdmin.add_fieldsets = (\n    (None, {\n        'classes': ('wide',),\n        'fields': ('email', 'username', 'password1', 'password2',)\n    }),\n)\nUserAdmin.list_display = [\n    'username', 'email', 'first_name', 'last_name', 'is_staff',\n    'is_active', 'date_joined', 'last_login'\n]\n\nclass InlineResourceFiles(GenericTabularInline):\n    model = ResourceFile\n\nadmin.site.unregister(User)\nadmin.site.register(User, UserAdmin)\nadmin.site.unregister(GenericResource)\n", "path": "hs_core/admin.py"}], "after_files": [{"content": "from django import forms\nfrom django.contrib.auth.admin import UserAdmin\nfrom django.contrib.auth.forms import UserCreationForm\nfrom django.contrib.gis import admin\nfrom django.contrib.contenttypes.admin import GenericTabularInline\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom .models import *\n\n\nclass UserCreationFormExtended(UserCreationForm):\n    def __init__(self, *args, **kwargs):\n        super(UserCreationFormExtended, self).__init__(*args, **kwargs)\n        self.fields['email'] = forms.EmailField(label=_(\"E-mail\"), max_length=75)\n\nUserAdmin.add_form = UserCreationFormExtended\nUserAdmin.readonly_fields = ('username',)\nUserAdmin.add_fieldsets = (\n    (None, {\n        'classes': ('wide',),\n        'fields': ('email', 'username', 'password1', 'password2',)\n    }),\n)\nUserAdmin.list_display = [\n    'username', 'email', 'first_name', 'last_name', 'is_staff',\n    'is_active', 'date_joined', 'last_login'\n]\n\nclass InlineResourceFiles(GenericTabularInline):\n    model = ResourceFile\n\nadmin.site.unregister(User)\nadmin.site.register(User, UserAdmin)\nadmin.site.unregister(GenericResource)\n", "path": "hs_core/admin.py"}]}