From c727d351ba596954e8050be53447691427ca54f3 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 23 Aug 2021 15:33:49 -0700 Subject: [PATCH] Fixes variable name --- bookwyrm/urls.py | 4 ++-- bookwyrm/views/__init__.py | 2 +- bookwyrm/views/list.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bookwyrm/urls.py b/bookwyrm/urls.py index 4494ba5a7..1dbd67a76 100644 --- a/bookwyrm/urls.py +++ b/bookwyrm/urls.py @@ -234,8 +234,8 @@ urlpatterns = [ re_path( r"^list/(?P\d+)/curate/?$", views.Curate.as_view(), name="list-curate" ), - re_path(r"^save-list/(?P\d+)/?$", views.saveList, name="list-save"), - re_path(r"^unsave-list/(?P\d+)/?$", views.unsaveList, name="list-unsave"), + re_path(r"^save-list/(?P\d+)/?$", views.save_list, name="list-save"), + re_path(r"^unsave-list/(?P\d+)/?$", views.unsave_list, name="list-unsave"), # User books re_path(r"%s/books/?$" % USER_PATH, views.Shelf.as_view(), name="user-shelves"), re_path( diff --git a/bookwyrm/views/__init__.py b/bookwyrm/views/__init__.py index bee367f79..f42049254 100644 --- a/bookwyrm/views/__init__.py +++ b/bookwyrm/views/__init__.py @@ -26,7 +26,7 @@ from .invite import ManageInviteRequests, ignore_invite_request from .isbn import Isbn from .landing import About, Home, Landing from .list import Lists, SavedLists, List, Curate, UserLists -from .list import saveList, unsaveList +from .list import save_list, unsave_list from .notifications import Notifications from .outbox import Outbox from .reading import edit_readthrough, create_readthrough diff --git a/bookwyrm/views/list.py b/bookwyrm/views/list.py index aab7c2519..e6ef52ba5 100644 --- a/bookwyrm/views/list.py +++ b/bookwyrm/views/list.py @@ -244,7 +244,7 @@ class Curate(View): @require_POST @login_required -def saveList(request, list_id): +def save_list(request, list_id): """save a list""" book_list = get_object_or_404(models.List, id=list_id) request.user.saved_lists.add(book_list) @@ -253,7 +253,7 @@ def saveList(request, list_id): @require_POST @login_required -def unsaveList(request, list_id): +def unsave_list(request, list_id): """unsave a list""" book_list = get_object_or_404(models.List, id=list_id) request.user.saved_lists.remove(book_list)