prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Make creator a readonly field in django admin
  With a large user base the dropdown used for the user selection in django admin becomes unresponsive. As there is no apparent reason to change the creator of an object (comment, item, rate, poll, ...) the creator field should be made read_only.
  
  The same problem occurs for every model where a user is set as a foreign key (Action: actor, Projects: member/moderator, Organisation: initiator)
  
  The readonly property can either be set on every Admin class by setting ` readonly_fields = ('creator',)` individually or by using a custom `A4Admin(admin.ModelAdmin)` which has to be set as the parent for every Admin class used.
  
  --- 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/polls/admin.py`
  Content:
  ```
  1 from django.contrib import admin
  2 
  3 from . import models
  4 
  5 
  6 class ChoiceInline(admin.TabularInline):
  7     model = models.Choice
  8 
  9 
  10 class QuestionAdmin(admin.ModelAdmin):
  11     inlines = [
  12         ChoiceInline
  13     ]
  14 
  15 
  16 class VoteAdmin(admin.ModelAdmin):
  17     list_filter = ('choice__question',)
  18 
  19 
  20 admin.site.register(models.Question, QuestionAdmin)
  21 admin.site.register(models.Vote, VoteAdmin)
  22
  ```
  
  Path: `apps/documents/admin.py`
  Content:
  ```
  1 from django.contrib import admin
  2 
  3 from . import models
  4 
  5 
  6 class ParagraphAdmin(admin.ModelAdmin):
  7     list_filter = ('chapter',)
  8 
  9 
  10 admin.site.register(models.Chapter)
  11 admin.site.register(models.Paragraph, ParagraphAdmin)
  12
  ```
  
  Path: `apps/offlineevents/admin.py`
  Content:
  ```
  1 from django.contrib import admin
  2 
  3 from . import models
  4 
  5 admin.site.register(models.OfflineEvent, admin.ModelAdmin)
  6
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/apps/documents/admin.py b/apps/documents/admin.py
  --- a/apps/documents/admin.py
  +++ b/apps/documents/admin.py
  @@ -3,9 +3,12 @@
   from . import models
   
   
  +@admin.register(models.Paragraph)
   class ParagraphAdmin(admin.ModelAdmin):
       list_filter = ('chapter',)
  +    readonly_fields = ('creator',)
   
   
  -admin.site.register(models.Chapter)
  -admin.site.register(models.Paragraph, ParagraphAdmin)
  +@admin.register(models.Chapter)
  +class ChapterAdmin(admin.ModelAdmin):
  +    readonly_fields = ('creator', )
  diff --git a/apps/offlineevents/admin.py b/apps/offlineevents/admin.py
  --- a/apps/offlineevents/admin.py
  +++ b/apps/offlineevents/admin.py
  @@ -2,4 +2,7 @@
   
   from . import models
   
  -admin.site.register(models.OfflineEvent, admin.ModelAdmin)
  +
  +@admin.register(models.OfflineEvent)
  +class OfflineEventAdmin(admin.ModelAdmin):
  +    readonly_fields = ('creator', )
  diff --git a/apps/polls/admin.py b/apps/polls/admin.py
  --- a/apps/polls/admin.py
  +++ b/apps/polls/admin.py
  @@ -7,15 +7,8 @@
       model = models.Choice
   
   
  +@admin.register(models.Question)
   class QuestionAdmin(admin.ModelAdmin):
       inlines = [
           ChoiceInline
       ]
  -
  -
  -class VoteAdmin(admin.ModelAdmin):
  -    list_filter = ('choice__question',)
  -
  -
  -admin.site.register(models.Question, QuestionAdmin)
  -admin.site.register(models.Vote, VoteAdmin)
  
verification_info: {"golden_diff": "diff --git a/apps/documents/admin.py b/apps/documents/admin.py\n--- a/apps/documents/admin.py\n+++ b/apps/documents/admin.py\n@@ -3,9 +3,12 @@\n from . import models\n \n \n+@admin.register(models.Paragraph)\n class ParagraphAdmin(admin.ModelAdmin):\n     list_filter = ('chapter',)\n+    readonly_fields = ('creator',)\n \n \n-admin.site.register(models.Chapter)\n-admin.site.register(models.Paragraph, ParagraphAdmin)\n+@admin.register(models.Chapter)\n+class ChapterAdmin(admin.ModelAdmin):\n+    readonly_fields = ('creator', )\ndiff --git a/apps/offlineevents/admin.py b/apps/offlineevents/admin.py\n--- a/apps/offlineevents/admin.py\n+++ b/apps/offlineevents/admin.py\n@@ -2,4 +2,7 @@\n \n from . import models\n \n-admin.site.register(models.OfflineEvent, admin.ModelAdmin)\n+\n+@admin.register(models.OfflineEvent)\n+class OfflineEventAdmin(admin.ModelAdmin):\n+    readonly_fields = ('creator', )\ndiff --git a/apps/polls/admin.py b/apps/polls/admin.py\n--- a/apps/polls/admin.py\n+++ b/apps/polls/admin.py\n@@ -7,15 +7,8 @@\n     model = models.Choice\n \n \n+@admin.register(models.Question)\n class QuestionAdmin(admin.ModelAdmin):\n     inlines = [\n         ChoiceInline\n     ]\n-\n-\n-class VoteAdmin(admin.ModelAdmin):\n-    list_filter = ('choice__question',)\n-\n-\n-admin.site.register(models.Question, QuestionAdmin)\n-admin.site.register(models.Vote, VoteAdmin)\n", "issue": "Make creator a readonly field in django admin\nWith a large user base the dropdown used for the user selection in django admin becomes unresponsive. As there is no apparent reason to change the creator of an object (comment, item, rate, poll, ...) the creator field should be made read_only.\r\n\r\nThe same problem occurs for every model where a user is set as a foreign key (Action: actor, Projects: member/moderator, Organisation: initiator)\r\n\r\nThe readonly property can either be set on every Admin class by setting ` readonly_fields = ('creator',)` individually or by using a custom `A4Admin(admin.ModelAdmin)` which has to be set as the parent for every Admin class used.\n", "before_files": [{"content": "from django.contrib import admin\n\nfrom . import models\n\n\nclass ChoiceInline(admin.TabularInline):\n    model = models.Choice\n\n\nclass QuestionAdmin(admin.ModelAdmin):\n    inlines = [\n        ChoiceInline\n    ]\n\n\nclass VoteAdmin(admin.ModelAdmin):\n    list_filter = ('choice__question',)\n\n\nadmin.site.register(models.Question, QuestionAdmin)\nadmin.site.register(models.Vote, VoteAdmin)\n", "path": "apps/polls/admin.py"}, {"content": "from django.contrib import admin\n\nfrom . import models\n\n\nclass ParagraphAdmin(admin.ModelAdmin):\n    list_filter = ('chapter',)\n\n\nadmin.site.register(models.Chapter)\nadmin.site.register(models.Paragraph, ParagraphAdmin)\n", "path": "apps/documents/admin.py"}, {"content": "from django.contrib import admin\n\nfrom . import models\n\nadmin.site.register(models.OfflineEvent, admin.ModelAdmin)\n", "path": "apps/offlineevents/admin.py"}], "after_files": [{"content": "from django.contrib import admin\n\nfrom . import models\n\n\nclass ChoiceInline(admin.TabularInline):\n    model = models.Choice\n\n\n@admin.register(models.Question)\nclass QuestionAdmin(admin.ModelAdmin):\n    inlines = [\n        ChoiceInline\n    ]\n", "path": "apps/polls/admin.py"}, {"content": "from django.contrib import admin\n\nfrom . import models\n\n\n@admin.register(models.Paragraph)\nclass ParagraphAdmin(admin.ModelAdmin):\n    list_filter = ('chapter',)\n    readonly_fields = ('creator',)\n\n\n@admin.register(models.Chapter)\nclass ChapterAdmin(admin.ModelAdmin):\n    readonly_fields = ('creator', )\n", "path": "apps/documents/admin.py"}, {"content": "from django.contrib import admin\n\nfrom . import models\n\n\n@admin.register(models.OfflineEvent)\nclass OfflineEventAdmin(admin.ModelAdmin):\n    readonly_fields = ('creator', )\n", "path": "apps/offlineevents/admin.py"}]}