prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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.
  
  </issue>
  <code>
  [start of apps/polls/admin.py]
  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
  [end of apps/polls/admin.py]
  [start of apps/documents/admin.py]
  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
  [end of apps/documents/admin.py]
  [start of apps/offlineevents/admin.py]
  1 from django.contrib import admin
  2 
  3 from . import models
  4 
  5 admin.site.register(models.OfflineEvent, admin.ModelAdmin)
  6
  [end of apps/offlineevents/admin.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
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"}]}