Fixes variable name

This commit is contained in:
Mouse Reeve 2021-08-23 15:33:49 -07:00
parent f267e53b56
commit c727d351ba
3 changed files with 5 additions and 5 deletions

View file

@ -234,8 +234,8 @@ urlpatterns = [
re_path(
r"^list/(?P<list_id>\d+)/curate/?$", views.Curate.as_view(), name="list-curate"
),
re_path(r"^save-list/(?P<list_id>\d+)/?$", views.saveList, name="list-save"),
re_path(r"^unsave-list/(?P<list_id>\d+)/?$", views.unsaveList, name="list-unsave"),
re_path(r"^save-list/(?P<list_id>\d+)/?$", views.save_list, name="list-save"),
re_path(r"^unsave-list/(?P<list_id>\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(

View file

@ -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

View file

@ -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)