Backwards compatibility with "shelf" urls

This commit is contained in:
Mouse Reeve
2021-03-31 09:50:16 -07:00
parent 4a490d25a8
commit f8ce9b0956
4 changed files with 6 additions and 5 deletions

View File

@ -154,13 +154,14 @@ urlpatterns = [
# shelf
re_path(r"%s/books/?$" % user_path, views.user_shelves_page, name="user-shelves"),
re_path(
r"^%s/books/(?P<shelf_identifier>[\w-]+)(.json)?/?$" % user_path,
r"^%s/(helf|books)/(?P<shelf_identifier>[\w-]+)(.json)?/?$" % user_path,
views.Shelf.as_view(),
name="shelf",
),
re_path(
r"^%s/books/(?P<shelf_identifier>[\w-]+)(.json)?/?$" % local_user_path,
r"^%s/(books|shelf)/(?P<shelf_identifier>[\w-]+)(.json)?/?$" % local_user_path,
views.Shelf.as_view(),
name="shelf"
),
re_path(r"^create-shelf/?$", views.create_shelf, name="shelf-create"),
re_path(r"^delete-shelf/(?P<shelf_id>\d+)?$", views.delete_shelf),