prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Saved lists pagination is broken
  **Describe the bug**
  Trying to move through pages of saved lists is broken. Instead, one moves back to all lists.
  
  **To Reproduce**
  Steps to reproduce the behavior:
  1. Save enough lists to have at least two pages
  2. Go to [`Lists -> Saved Lists`](https://bookwyrm.social/list/saved)
  3. Click on `Next`
  4. Wonder why the lists shown are not the ones you saved
  5. Realize you're back on `All Lists`
  
  **Expected behavior**
  One should be able to paginate through saved lists
  
  **Instance**
  [bookwyrm.social](https://bookwyrm.social/)
  
  **Additional comments**
  I'm trying to dig through the code a bit, but I don't have time to setup dev environment and populate local dbs and whatever needs to be done. It might just be that `path` needs to be changed to `/list/saved` [here](https://github.com/bookwyrm-social/bookwyrm/blob/6667178703b93d0d1874f1fd547e97c12a2ec144/bookwyrm/views/list/lists.py#L62)? But idk, this isn't a stack I'm very intimate with 🤷
  
  
  </issue>
  <code>
  [start of bookwyrm/views/list/lists.py]
  1 """ book list views"""
  2 from django.contrib.auth.decorators import login_required
  3 from django.core.paginator import Paginator
  4 from django.shortcuts import redirect
  5 from django.template.response import TemplateResponse
  6 from django.utils.decorators import method_decorator
  7 from django.views import View
  8 
  9 from bookwyrm import forms, models
  10 from bookwyrm.lists_stream import ListsStream
  11 from bookwyrm.views.helpers import get_user_from_username
  12 
  13 
  14 # pylint: disable=no-self-use
  15 class Lists(View):
  16     """book list page"""
  17 
  18     def get(self, request):
  19         """display a book list"""
  20         if request.user.is_authenticated:
  21             lists = ListsStream().get_list_stream(request.user)
  22         else:
  23             lists = models.List.objects.filter(privacy="public")
  24         paginated = Paginator(lists, 12)
  25         data = {
  26             "lists": paginated.get_page(request.GET.get("page")),
  27             "list_form": forms.ListForm(),
  28             "path": "/list",
  29         }
  30         return TemplateResponse(request, "lists/lists.html", data)
  31 
  32     @method_decorator(login_required, name="dispatch")
  33     # pylint: disable=unused-argument
  34     def post(self, request):
  35         """create a book_list"""
  36         form = forms.ListForm(request.POST)
  37         if not form.is_valid():
  38             return redirect("lists")
  39         book_list = form.save(request, commit=False)
  40 
  41         # list should not have a group if it is not group curated
  42         if not book_list.curation == "group":
  43             book_list.group = None
  44         book_list.save()
  45 
  46         return redirect(book_list.local_path)
  47 
  48 
  49 @method_decorator(login_required, name="dispatch")
  50 class SavedLists(View):
  51     """saved book list page"""
  52 
  53     def get(self, request):
  54         """display book lists"""
  55         # hide lists with no approved books
  56         lists = request.user.saved_lists.order_by("-updated_date")
  57 
  58         paginated = Paginator(lists, 12)
  59         data = {
  60             "lists": paginated.get_page(request.GET.get("page")),
  61             "list_form": forms.ListForm(),
  62             "path": "/list",
  63         }
  64         return TemplateResponse(request, "lists/lists.html", data)
  65 
  66 
  67 @method_decorator(login_required, name="dispatch")
  68 class UserLists(View):
  69     """a user's book list page"""
  70 
  71     def get(self, request, username):
  72         """display a book list"""
  73         user = get_user_from_username(request.user, username)
  74         lists = models.List.privacy_filter(request.user).filter(user=user)
  75         paginated = Paginator(lists, 12)
  76 
  77         data = {
  78             "user": user,
  79             "is_self": request.user.id == user.id,
  80             "lists": paginated.get_page(request.GET.get("page")),
  81             "list_form": forms.ListForm(),
  82             "path": user.local_path + "/lists",
  83         }
  84         return TemplateResponse(request, "user/lists.html", data)
  85
  [end of bookwyrm/views/list/lists.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/bookwyrm/views/list/lists.py b/bookwyrm/views/list/lists.py
  --- a/bookwyrm/views/list/lists.py
  +++ b/bookwyrm/views/list/lists.py
  @@ -59,7 +59,7 @@
           data = {
               "lists": paginated.get_page(request.GET.get("page")),
               "list_form": forms.ListForm(),
  -            "path": "/list",
  +            "path": "/list/saved",
           }
           return TemplateResponse(request, "lists/lists.html", data)
  
verification_info: {"golden_diff": "diff --git a/bookwyrm/views/list/lists.py b/bookwyrm/views/list/lists.py\n--- a/bookwyrm/views/list/lists.py\n+++ b/bookwyrm/views/list/lists.py\n@@ -59,7 +59,7 @@\n         data = {\n             \"lists\": paginated.get_page(request.GET.get(\"page\")),\n             \"list_form\": forms.ListForm(),\n-            \"path\": \"/list\",\n+            \"path\": \"/list/saved\",\n         }\n         return TemplateResponse(request, \"lists/lists.html\", data)\n", "issue": "Saved lists pagination is broken\n**Describe the bug**\r\nTrying to move through pages of saved lists is broken. Instead, one moves back to all lists.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. Save enough lists to have at least two pages\r\n2. Go to [`Lists -> Saved Lists`](https://bookwyrm.social/list/saved)\r\n3. Click on `Next`\r\n4. Wonder why the lists shown are not the ones you saved\r\n5. Realize you're back on `All Lists`\r\n\r\n**Expected behavior**\r\nOne should be able to paginate through saved lists\r\n\r\n**Instance**\r\n[bookwyrm.social](https://bookwyrm.social/)\r\n\r\n**Additional comments**\r\nI'm trying to dig through the code a bit, but I don't have time to setup dev environment and populate local dbs and whatever needs to be done. It might just be that `path` needs to be changed to `/list/saved` [here](https://github.com/bookwyrm-social/bookwyrm/blob/6667178703b93d0d1874f1fd547e97c12a2ec144/bookwyrm/views/list/lists.py#L62)? But idk, this isn't a stack I'm very intimate with \ud83e\udd37\r\n\n", "before_files": [{"content": "\"\"\" book list views\"\"\"\nfrom django.contrib.auth.decorators import login_required\nfrom django.core.paginator import Paginator\nfrom django.shortcuts import redirect\nfrom django.template.response import TemplateResponse\nfrom django.utils.decorators import method_decorator\nfrom django.views import View\n\nfrom bookwyrm import forms, models\nfrom bookwyrm.lists_stream import ListsStream\nfrom bookwyrm.views.helpers import get_user_from_username\n\n\n# pylint: disable=no-self-use\nclass Lists(View):\n    \"\"\"book list page\"\"\"\n\n    def get(self, request):\n        \"\"\"display a book list\"\"\"\n        if request.user.is_authenticated:\n            lists = ListsStream().get_list_stream(request.user)\n        else:\n            lists = models.List.objects.filter(privacy=\"public\")\n        paginated = Paginator(lists, 12)\n        data = {\n            \"lists\": paginated.get_page(request.GET.get(\"page\")),\n            \"list_form\": forms.ListForm(),\n            \"path\": \"/list\",\n        }\n        return TemplateResponse(request, \"lists/lists.html\", data)\n\n    @method_decorator(login_required, name=\"dispatch\")\n    # pylint: disable=unused-argument\n    def post(self, request):\n        \"\"\"create a book_list\"\"\"\n        form = forms.ListForm(request.POST)\n        if not form.is_valid():\n            return redirect(\"lists\")\n        book_list = form.save(request, commit=False)\n\n        # list should not have a group if it is not group curated\n        if not book_list.curation == \"group\":\n            book_list.group = None\n        book_list.save()\n\n        return redirect(book_list.local_path)\n\n\n@method_decorator(login_required, name=\"dispatch\")\nclass SavedLists(View):\n    \"\"\"saved book list page\"\"\"\n\n    def get(self, request):\n        \"\"\"display book lists\"\"\"\n        # hide lists with no approved books\n        lists = request.user.saved_lists.order_by(\"-updated_date\")\n\n        paginated = Paginator(lists, 12)\n        data = {\n            \"lists\": paginated.get_page(request.GET.get(\"page\")),\n            \"list_form\": forms.ListForm(),\n            \"path\": \"/list\",\n        }\n        return TemplateResponse(request, \"lists/lists.html\", data)\n\n\n@method_decorator(login_required, name=\"dispatch\")\nclass UserLists(View):\n    \"\"\"a user's book list page\"\"\"\n\n    def get(self, request, username):\n        \"\"\"display a book list\"\"\"\n        user = get_user_from_username(request.user, username)\n        lists = models.List.privacy_filter(request.user).filter(user=user)\n        paginated = Paginator(lists, 12)\n\n        data = {\n            \"user\": user,\n            \"is_self\": request.user.id == user.id,\n            \"lists\": paginated.get_page(request.GET.get(\"page\")),\n            \"list_form\": forms.ListForm(),\n            \"path\": user.local_path + \"/lists\",\n        }\n        return TemplateResponse(request, \"user/lists.html\", data)\n", "path": "bookwyrm/views/list/lists.py"}]}