From 638ea166be528d355b68819a6872250dcd69d1b1 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 28 Dec 2021 14:41:45 -0800 Subject: [PATCH] More trailing slashes in urls --- bookwyrm/urls.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bookwyrm/urls.py b/bookwyrm/urls.py index b9fe1f209..bd36f3d85 100644 --- a/bookwyrm/urls.py +++ b/bookwyrm/urls.py @@ -50,7 +50,7 @@ urlpatterns = [ re_path("^api/updates/stream/(?P[a-z]+)/?$", views.get_unread_status_count), # authentication re_path(r"^login/?$", views.Login.as_view(), name="login"), - re_path(r"^login/(?Pconfirmed)?$", views.Login.as_view(), name="login"), + re_path(r"^login/(?Pconfirmed)/?$", views.Login.as_view(), name="login"), re_path(r"^register/?$", views.Register.as_view()), re_path(r"confirm-email/?$", views.ConfirmEmail.as_view(), name="confirm-email"), re_path( @@ -112,12 +112,12 @@ urlpatterns = [ name="settings-federated-server", ), re_path( - r"^settings/federation/(?P\d+)/block?$", + r"^settings/federation/(?P\d+)/block/?$", views.block_server, name="settings-federated-server-block", ), re_path( - r"^settings/federation/(?P\d+)/unblock?$", + r"^settings/federation/(?P\d+)/unblock/?$", views.unblock_server, name="settings-federated-server-unblock", ), @@ -140,7 +140,7 @@ urlpatterns = [ name="settings-invite-requests", ), re_path( - r"^settings/requests/ignore?$", + r"^settings/requests/ignore/?$", views.ignore_invite_request, name="settings-invite-requests-ignore", ), @@ -229,7 +229,7 @@ urlpatterns = [ r"^direct-messages/?$", views.DirectMessage.as_view(), name="direct-messages" ), re_path( - rf"^direct-messages/(?P{regex.USERNAME})?$", + rf"^direct-messages/(?P{regex.USERNAME})/?$", views.DirectMessage.as_view(), name="direct-messages-user", ), @@ -356,7 +356,7 @@ urlpatterns = [ name="shelf", ), re_path(r"^create-shelf/?$", views.create_shelf, name="shelf-create"), - re_path(r"^delete-shelf/(?P\d+)?$", views.delete_shelf), + re_path(r"^delete-shelf/(?P\d+)/?$", views.delete_shelf), re_path(r"^shelve/?$", views.shelve), re_path(r"^unshelve/?$", views.unshelve), # goals @@ -423,7 +423,7 @@ urlpatterns = [ re_path(rf"{BOOK_PATH}/edit/?$", views.EditBook.as_view(), name="edit-book"), re_path(rf"{BOOK_PATH}/confirm/?$", views.ConfirmEditBook.as_view()), re_path(r"^create-book/?$", views.EditBook.as_view(), name="create-book"), - re_path(r"^create-book/confirm?$", views.ConfirmEditBook.as_view()), + re_path(r"^create-book/confirm/?$", views.ConfirmEditBook.as_view()), re_path(rf"{BOOK_PATH}/editions(.json)?/?$", views.Editions.as_view()), re_path( r"^upload-cover/(?P\d+)/?$", views.upload_cover, name="upload-cover"