prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Plus de pagination dans la liste des membres
  Url incriminée :  http://beta.zestedesavoir.com/membres/
  
  On ne voit que 100 membres inscrit, alors qu'il y'en a plus.
  
  
  </issue>
  <code>
  [start of zds/utils/paginator.py]
  1 # coding: utf-8
  2 
  3 from django.views.generic import ListView
  4 from django.views.generic.list import MultipleObjectMixin
  5 
  6 from zds.settings import ZDS_APP
  7 
  8 
  9 class ZdSPagingListView(ListView):
  10     def get_context_data(self, **kwargs):
  11         """
  12         Get the context for this view. This method is surcharged to modify the paginator
  13         and information given at the template.
  14         """
  15         queryset = kwargs.pop('object_list', self.object_list)
  16         page_size = self.get_paginate_by(queryset)
  17         context_object_name = self.get_context_object_name(queryset)
  18         paginator, page, queryset, is_paginated = self.paginate_queryset(queryset, page_size)
  19         if page_size:
  20             paginator, page, queryset, is_paginated = self.paginate_queryset(queryset, page_size)
  21             context = {
  22                 'paginator': paginator,
  23                 'page_obj': page,
  24                 'is_paginated': is_paginated,
  25                 'object_list': queryset,
  26                 'pages': paginator_range(page.number, paginator.num_pages),
  27             }
  28         else:
  29             context = {
  30                 'paginator': None,
  31                 'page_obj': None,
  32                 'is_paginated': False,
  33                 'object_list': queryset,
  34                 'pages': [],
  35             }
  36         if context_object_name is not None:
  37             context[context_object_name] = queryset
  38         context.update(kwargs)
  39         return super(MultipleObjectMixin, self).get_context_data(**context)
  40 
  41 
  42 def paginator_range(current, stop, start=1):
  43     assert (current <= stop)
  44 
  45     # Basic case when no folding
  46     if stop - start <= ZDS_APP['paginator']['folding_limit']:
  47         return range(start, stop + 1)
  48 
  49     # Complex case when folding
  50     lst = []
  51     for page_number in range(start, stop + 1):
  52         # Bounds
  53         if page_number == start or page_number == stop:
  54             lst.append(page_number)
  55             if page_number == start and current - start > 2:
  56                 lst.append(None)
  57         # Neighbors
  58         elif abs(page_number - current) == 1:
  59             lst.append(page_number)
  60             if page_number - current > 0 and stop - page_number > 2:
  61                 lst.append(None)
  62         # Current
  63         elif page_number == current:
  64             lst.append(page_number)
  65         # Put some
  66         elif page_number == stop - 1 and current == stop - 3:
  67             lst.append(page_number)
  68             # And ignore all other numbers
  69 
  70     return lst
  71
  [end of zds/utils/paginator.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/zds/utils/paginator.py b/zds/utils/paginator.py
  --- a/zds/utils/paginator.py
  +++ b/zds/utils/paginator.py
  @@ -17,7 +17,6 @@
           context_object_name = self.get_context_object_name(queryset)
           paginator, page, queryset, is_paginated = self.paginate_queryset(queryset, page_size)
           if page_size:
  -            paginator, page, queryset, is_paginated = self.paginate_queryset(queryset, page_size)
               context = {
                   'paginator': paginator,
                   'page_obj': page,
  
verification_info: {"golden_diff": "diff --git a/zds/utils/paginator.py b/zds/utils/paginator.py\n--- a/zds/utils/paginator.py\n+++ b/zds/utils/paginator.py\n@@ -17,7 +17,6 @@\n         context_object_name = self.get_context_object_name(queryset)\n         paginator, page, queryset, is_paginated = self.paginate_queryset(queryset, page_size)\n         if page_size:\n-            paginator, page, queryset, is_paginated = self.paginate_queryset(queryset, page_size)\n             context = {\n                 'paginator': paginator,\n                 'page_obj': page,\n", "issue": "Plus de pagination dans la liste des membres\nUrl incrimin\u00e9e :  http://beta.zestedesavoir.com/membres/\n\nOn ne voit que 100 membres inscrit, alors qu'il y'en a plus.\n\n", "before_files": [{"content": "# coding: utf-8\n\nfrom django.views.generic import ListView\nfrom django.views.generic.list import MultipleObjectMixin\n\nfrom zds.settings import ZDS_APP\n\n\nclass ZdSPagingListView(ListView):\n    def get_context_data(self, **kwargs):\n        \"\"\"\n        Get the context for this view. This method is surcharged to modify the paginator\n        and information given at the template.\n        \"\"\"\n        queryset = kwargs.pop('object_list', self.object_list)\n        page_size = self.get_paginate_by(queryset)\n        context_object_name = self.get_context_object_name(queryset)\n        paginator, page, queryset, is_paginated = self.paginate_queryset(queryset, page_size)\n        if page_size:\n            paginator, page, queryset, is_paginated = self.paginate_queryset(queryset, page_size)\n            context = {\n                'paginator': paginator,\n                'page_obj': page,\n                'is_paginated': is_paginated,\n                'object_list': queryset,\n                'pages': paginator_range(page.number, paginator.num_pages),\n            }\n        else:\n            context = {\n                'paginator': None,\n                'page_obj': None,\n                'is_paginated': False,\n                'object_list': queryset,\n                'pages': [],\n            }\n        if context_object_name is not None:\n            context[context_object_name] = queryset\n        context.update(kwargs)\n        return super(MultipleObjectMixin, self).get_context_data(**context)\n\n\ndef paginator_range(current, stop, start=1):\n    assert (current <= stop)\n\n    # Basic case when no folding\n    if stop - start <= ZDS_APP['paginator']['folding_limit']:\n        return range(start, stop + 1)\n\n    # Complex case when folding\n    lst = []\n    for page_number in range(start, stop + 1):\n        # Bounds\n        if page_number == start or page_number == stop:\n            lst.append(page_number)\n            if page_number == start and current - start > 2:\n                lst.append(None)\n        # Neighbors\n        elif abs(page_number - current) == 1:\n            lst.append(page_number)\n            if page_number - current > 0 and stop - page_number > 2:\n                lst.append(None)\n        # Current\n        elif page_number == current:\n            lst.append(page_number)\n        # Put some\n        elif page_number == stop - 1 and current == stop - 3:\n            lst.append(page_number)\n            # And ignore all other numbers\n\n    return lst\n", "path": "zds/utils/paginator.py"}]}