prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Change sorting order on organization page
  We currently sort projects on the organization pages from oldest to newest (date of creation). We should reverse the order, so that new projects are shown first.
  
  </issue>
  <code>
  [start of euth/organisations/views.py]
  1 from django.views import generic
  2 
  3 from . import models
  4 
  5 
  6 class OrganisationDetailView(generic.DetailView):
  7     model = models.Organisation
  8 
  9     def visible_projects(self):
  10         if self.request.user in self.object.initiators.all():
  11             return self.object.project_set.all()
  12         else:
  13             return self.object.project_set.filter(is_draft=False)
  14 
  15 
  16 class OrganisationListView(generic.ListView):
  17     model = models.Organisation
  18     paginate_by = 12
  19
  [end of euth/organisations/views.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/euth/organisations/views.py b/euth/organisations/views.py
  --- a/euth/organisations/views.py
  +++ b/euth/organisations/views.py
  @@ -7,10 +7,11 @@
       model = models.Organisation
   
       def visible_projects(self):
  +        projects = self.object.project_set.order_by('-created')
           if self.request.user in self.object.initiators.all():
  -            return self.object.project_set.all()
  +            return projects.all()
           else:
  -            return self.object.project_set.filter(is_draft=False)
  +            return projects.filter(is_draft=False)
   
   
   class OrganisationListView(generic.ListView):
  
verification_info: {"golden_diff": "diff --git a/euth/organisations/views.py b/euth/organisations/views.py\n--- a/euth/organisations/views.py\n+++ b/euth/organisations/views.py\n@@ -7,10 +7,11 @@\n     model = models.Organisation\n \n     def visible_projects(self):\n+        projects = self.object.project_set.order_by('-created')\n         if self.request.user in self.object.initiators.all():\n-            return self.object.project_set.all()\n+            return projects.all()\n         else:\n-            return self.object.project_set.filter(is_draft=False)\n+            return projects.filter(is_draft=False)\n \n \n class OrganisationListView(generic.ListView):\n", "issue": "Change sorting order on organization page\nWe currently sort projects on the organization pages from oldest to newest (date of creation). We should reverse the order, so that new projects are shown first.\n", "before_files": [{"content": "from django.views import generic\n\nfrom . import models\n\n\nclass OrganisationDetailView(generic.DetailView):\n    model = models.Organisation\n\n    def visible_projects(self):\n        if self.request.user in self.object.initiators.all():\n            return self.object.project_set.all()\n        else:\n            return self.object.project_set.filter(is_draft=False)\n\n\nclass OrganisationListView(generic.ListView):\n    model = models.Organisation\n    paginate_by = 12\n", "path": "euth/organisations/views.py"}]}