prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Add a time column to challenge requests table
  **Is your feature request related to a problem? Please describe.**
  Its not clear right away when each challenge request was submitted.
  
  
  **Describe the solution you'd like**
  I would like to add a column that shows the time when challenge request was submitted. It would be handy. 
  
  **Describe alternatives you've considered**
  Looking at a specific challenge request page to see the time.
  
  **Additional context**
  Idea shown on the picture below. Color coding is not necessary, but could be nice.
  ![requesttime](https://user-images.githubusercontent.com/37930396/164007865-b92bb7c9-dc2e-461d-a9d9-857779ed932f.png)
  
  </issue>
  <code>
  [start of app/grandchallenge/challenges/admin.py]
  1 from django.contrib import admin, messages
  2 from django.contrib.admin import ModelAdmin
  3 from django.core.exceptions import ValidationError
  4 
  5 from grandchallenge.challenges.emails import send_challenge_status_update_email
  6 from grandchallenge.challenges.models import (
  7     Challenge,
  8     ChallengeRequest,
  9     ChallengeSeries,
  10     ExternalChallenge,
  11 )
  12 
  13 
  14 class ChallengeAdmin(ModelAdmin):
  15     readonly_fields = ("creator",)
  16     autocomplete_fields = ("publications",)
  17     ordering = ("-created",)
  18     list_display = ("short_name", "created")
  19     search_fields = ("short_name",)
  20 
  21 
  22 class ExternalChallengeAdmin(ModelAdmin):
  23     readonly_fields = ("creator",)
  24     autocomplete_fields = ("publications",)
  25 
  26 
  27 class ChallengeRequestAdmin(ModelAdmin):
  28     readonly_fields = ("creator",)
  29     ordering = ("-created",)
  30     list_display = ("title", "short_name", "creator", "created", "status")
  31     actions = ["create_challenge", "send_status_update_email"]
  32 
  33     @admin.action(description="Create challenge for this request")
  34     def create_challenge(self, request, queryset):
  35         for challengerequest in queryset:
  36             try:
  37                 challengerequest.create_challenge()
  38             except ValidationError:
  39                 self.message_user(
  40                     request,
  41                     f"There already is a challenge with short "
  42                     f"name: {challengerequest.short_name}",
  43                     messages.WARNING,
  44                 )
  45 
  46     @admin.action(description="Send status update email to requester")
  47     def send_status_update_email(self, request, queryset):
  48         for challengerequest in queryset:
  49             if (
  50                 challengerequest.status
  51                 == challengerequest.ChallengeRequestStatusChoices.ACCEPTED
  52             ):
  53                 try:
  54                     challenge = Challenge.objects.get(
  55                         short_name=challengerequest.short_name
  56                     )
  57                 except Challenge.DoesNotExist:
  58                     challenge = challengerequest.create_challenge()
  59             else:
  60                 challenge = None
  61             send_challenge_status_update_email(
  62                 challengerequest=challengerequest, challenge=challenge
  63             )
  64 
  65 
  66 admin.site.register(Challenge, ChallengeAdmin)
  67 admin.site.register(ExternalChallenge, ExternalChallengeAdmin)
  68 admin.site.register(ChallengeSeries)
  69 admin.site.register(ChallengeRequest, ChallengeRequestAdmin)
  70
  [end of app/grandchallenge/challenges/admin.py]
  [start of app/grandchallenge/core/templatetags/naturaldelta.py]
  1 import humanize
  2 from django import template
  3 
  4 register = template.Library()
  5 
  6 
  7 @register.filter
  8 def naturaldelta(value):
  9     return humanize.naturaldelta(value, months=False)
  10
  [end of app/grandchallenge/core/templatetags/naturaldelta.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/app/grandchallenge/challenges/admin.py b/app/grandchallenge/challenges/admin.py
  --- a/app/grandchallenge/challenges/admin.py
  +++ b/app/grandchallenge/challenges/admin.py
  @@ -27,8 +27,22 @@
   class ChallengeRequestAdmin(ModelAdmin):
       readonly_fields = ("creator",)
       ordering = ("-created",)
  -    list_display = ("title", "short_name", "creator", "created", "status")
  +    list_display = (
  +        "title",
  +        "short_name",
  +        "creator",
  +        "created",
  +        "status",
  +        "challenge_type",
  +        "total_cost",
  +        "budget_for_hosting_challenge",
  +    )
       actions = ["create_challenge", "send_status_update_email"]
  +    list_filter = ["status", "challenge_type"]
  +
  +    @admin.display(description="Total cost")
  +    def total_cost(self, obj):
  +        return "%s" % (obj.budget["Total"])
   
       @admin.action(description="Create challenge for this request")
       def create_challenge(self, request, queryset):
  diff --git a/app/grandchallenge/core/templatetags/naturaldelta.py b/app/grandchallenge/core/templatetags/naturaldelta.py
  --- a/app/grandchallenge/core/templatetags/naturaldelta.py
  +++ b/app/grandchallenge/core/templatetags/naturaldelta.py
  @@ -1,5 +1,6 @@
   import humanize
   from django import template
  +from django.utils import timezone
   
   register = template.Library()
   
  @@ -7,3 +8,8 @@
   @register.filter
   def naturaldelta(value):
       return humanize.naturaldelta(value, months=False)
  +
  +
  +@register.filter
  +def timedifference(value):
  +    return (timezone.now() - value).days
  
verification_info: {"golden_diff": "diff --git a/app/grandchallenge/challenges/admin.py b/app/grandchallenge/challenges/admin.py\n--- a/app/grandchallenge/challenges/admin.py\n+++ b/app/grandchallenge/challenges/admin.py\n@@ -27,8 +27,22 @@\n class ChallengeRequestAdmin(ModelAdmin):\n     readonly_fields = (\"creator\",)\n     ordering = (\"-created\",)\n-    list_display = (\"title\", \"short_name\", \"creator\", \"created\", \"status\")\n+    list_display = (\n+        \"title\",\n+        \"short_name\",\n+        \"creator\",\n+        \"created\",\n+        \"status\",\n+        \"challenge_type\",\n+        \"total_cost\",\n+        \"budget_for_hosting_challenge\",\n+    )\n     actions = [\"create_challenge\", \"send_status_update_email\"]\n+    list_filter = [\"status\", \"challenge_type\"]\n+\n+    @admin.display(description=\"Total cost\")\n+    def total_cost(self, obj):\n+        return \"%s\" % (obj.budget[\"Total\"])\n \n     @admin.action(description=\"Create challenge for this request\")\n     def create_challenge(self, request, queryset):\ndiff --git a/app/grandchallenge/core/templatetags/naturaldelta.py b/app/grandchallenge/core/templatetags/naturaldelta.py\n--- a/app/grandchallenge/core/templatetags/naturaldelta.py\n+++ b/app/grandchallenge/core/templatetags/naturaldelta.py\n@@ -1,5 +1,6 @@\n import humanize\n from django import template\n+from django.utils import timezone\n \n register = template.Library()\n \n@@ -7,3 +8,8 @@\n @register.filter\n def naturaldelta(value):\n     return humanize.naturaldelta(value, months=False)\n+\n+\n+@register.filter\n+def timedifference(value):\n+    return (timezone.now() - value).days\n", "issue": "Add a time column to challenge requests table\n**Is your feature request related to a problem? Please describe.**\r\nIts not clear right away when each challenge request was submitted.\r\n\r\n\r\n**Describe the solution you'd like**\r\nI would like to add a column that shows the time when challenge request was submitted. It would be handy. \r\n\r\n**Describe alternatives you've considered**\r\nLooking at a specific challenge request page to see the time.\r\n\r\n**Additional context**\r\nIdea shown on the picture below. Color coding is not necessary, but could be nice.\r\n![requesttime](https://user-images.githubusercontent.com/37930396/164007865-b92bb7c9-dc2e-461d-a9d9-857779ed932f.png)\n", "before_files": [{"content": "from django.contrib import admin, messages\nfrom django.contrib.admin import ModelAdmin\nfrom django.core.exceptions import ValidationError\n\nfrom grandchallenge.challenges.emails import send_challenge_status_update_email\nfrom grandchallenge.challenges.models import (\n    Challenge,\n    ChallengeRequest,\n    ChallengeSeries,\n    ExternalChallenge,\n)\n\n\nclass ChallengeAdmin(ModelAdmin):\n    readonly_fields = (\"creator\",)\n    autocomplete_fields = (\"publications\",)\n    ordering = (\"-created\",)\n    list_display = (\"short_name\", \"created\")\n    search_fields = (\"short_name\",)\n\n\nclass ExternalChallengeAdmin(ModelAdmin):\n    readonly_fields = (\"creator\",)\n    autocomplete_fields = (\"publications\",)\n\n\nclass ChallengeRequestAdmin(ModelAdmin):\n    readonly_fields = (\"creator\",)\n    ordering = (\"-created\",)\n    list_display = (\"title\", \"short_name\", \"creator\", \"created\", \"status\")\n    actions = [\"create_challenge\", \"send_status_update_email\"]\n\n    @admin.action(description=\"Create challenge for this request\")\n    def create_challenge(self, request, queryset):\n        for challengerequest in queryset:\n            try:\n                challengerequest.create_challenge()\n            except ValidationError:\n                self.message_user(\n                    request,\n                    f\"There already is a challenge with short \"\n                    f\"name: {challengerequest.short_name}\",\n                    messages.WARNING,\n                )\n\n    @admin.action(description=\"Send status update email to requester\")\n    def send_status_update_email(self, request, queryset):\n        for challengerequest in queryset:\n            if (\n                challengerequest.status\n                == challengerequest.ChallengeRequestStatusChoices.ACCEPTED\n            ):\n                try:\n                    challenge = Challenge.objects.get(\n                        short_name=challengerequest.short_name\n                    )\n                except Challenge.DoesNotExist:\n                    challenge = challengerequest.create_challenge()\n            else:\n                challenge = None\n            send_challenge_status_update_email(\n                challengerequest=challengerequest, challenge=challenge\n            )\n\n\nadmin.site.register(Challenge, ChallengeAdmin)\nadmin.site.register(ExternalChallenge, ExternalChallengeAdmin)\nadmin.site.register(ChallengeSeries)\nadmin.site.register(ChallengeRequest, ChallengeRequestAdmin)\n", "path": "app/grandchallenge/challenges/admin.py"}, {"content": "import humanize\nfrom django import template\n\nregister = template.Library()\n\n\n@register.filter\ndef naturaldelta(value):\n    return humanize.naturaldelta(value, months=False)\n", "path": "app/grandchallenge/core/templatetags/naturaldelta.py"}]}