From 1693adfa1929af49d8a173be0d7365740b380dae Mon Sep 17 00:00:00 2001 From: Bryan Larson Date: Tue, 25 Feb 2020 16:37:31 -0500 Subject: [PATCH] HYP-184 - Updated URLs to make trailing slash optional --- app/contact/urls.py | 2 +- app/hypatio/urls.py | 6 +++--- app/manage/urls.py | 44 ++++++++++++++++++++++---------------------- app/profile/urls.py | 6 +++--- app/projects/urls.py | 30 +++++++++++++++--------------- 5 files changed, 44 insertions(+), 44 deletions(-) diff --git a/app/contact/urls.py b/app/contact/urls.py index e9f6c240..c43bd766 100644 --- a/app/contact/urls.py +++ b/app/contact/urls.py @@ -3,6 +3,6 @@ app_name = 'contact' urlpatterns = ( - url(r'^(?P[^/]+)/$', contact_form, name='contact_form'), + url(r'^(?P[^/]+)/?$', contact_form, name='contact_form'), url(r'^', contact_form, name='contact_form'), ) diff --git a/app/hypatio/urls.py b/app/hypatio/urls.py index 7b03fbfe..93e08fad 100644 --- a/app/hypatio/urls.py +++ b/app/hypatio/urls.py @@ -14,9 +14,9 @@ url(r'^manage/', include('manage.urls', namespace='manage')), url(r'^projects/', include('projects.urls', namespace='projects')), url(r'^profile/', include('profile.urls', namespace='profile')), - url(r'^data-sets/$', list_data_projects, name='data-sets'), - url(r'^data-challenges/$', list_data_challenges, name='data-challenges'), - url(r'^software-projects/$', list_software_projects, name='software-projects'), + url(r'^data-sets/?$', list_data_projects, name='data-sets'), + url(r'^data-challenges/?$', list_data_challenges, name='data-challenges'), + url(r'^software-projects/?$', list_software_projects, name='software-projects'), url(r'^healthcheck/?', include('health_check.urls')), url(r'^', index, name='index'), ] diff --git a/app/manage/urls.py b/app/manage/urls.py index 998b4687..821cf8a3 100644 --- a/app/manage/urls.py +++ b/app/manage/urls.py @@ -30,26 +30,26 @@ urlpatterns = [ url(r'^$', DataProjectListManageView.as_view(), name='manage-projects'), - url(r'^download-email-list/$', download_email_list, name='download-email-list'), - url(r'^set-dataproject-details/$', set_dataproject_details, name='set-dataproject-details'), - url(r'^set-dataproject-registration-status/$', set_dataproject_registration_status, name='set-dataproject-registration-status'), - url(r'^set-dataproject-visible-status/$', set_dataproject_visible_status, name='set-dataproject-visible-status'), - url(r'^get-static-agreement-form-html/$', get_static_agreement_form_html, name='get-static-agreement-form-html'), - url(r'^get-hosted-file-edit-form/$', get_hosted_file_edit_form, name='get-hosted-file-edit-form'), - url(r'^get-hosted-file-logs/$', get_hosted_file_logs, name='get-hosted-file-logs'), - url(r'^process-hosted-file-edit-form-submission/$', process_hosted_file_edit_form_submission, name='process-hosted-file-edit-form-submission'), - url(r'^download-signed-form/$', download_signed_form, name='download-signed-form'), - url(r'^change-signed-form-status/$', change_signed_form_status, name='change-signed-form-status'), - url(r'^save-team-comment/$', save_team_comment, name='save-team-comment'), - url(r'^set-team-status/$', set_team_status, name='set-team-status'), - url(r'^delete-team/$', delete_team, name='delete-team'), - url(r'^download-team-submissions/(?P[^/]+)/(?P[^/]+)/$', download_team_submissions, name='download-team-submissions'), - url(r'^download-submission/(?P[^/]+)/$', download_submission, name='download-submission'), - url(r'^host-submission/(?P[^/]+)/$', host_submission, name='host-submission'), - url(r'^sync-view-permissions/(?P[^/]+)/$', sync_view_permissions, name='sync-view-permissions'), - url(r'^grant-view-permission/(?P[^/]+)/(?P[^/]+)/$', grant_view_permission, name='grant-view-permission'), - url(r'^remove-view-permission/(?P[^/]+)/(?P[^/]+)/$', remove_view_permission, name='remove-view-permission'), - url(r'^get-project-participants/(?P[^/]+)/$', ProjectParticipants.as_view(), name='get-project-participants'), - url(r'^(?P[^/]+)/$', DataProjectManageView.as_view(), name='manage-project'), - url(r'^(?P[^/]+)/(?P[^/]+)/$', manage_team, name='manage-team'), + url(r'^download-email-list/?$', download_email_list, name='download-email-list'), + url(r'^set-dataproject-details/?$', set_dataproject_details, name='set-dataproject-details'), + url(r'^set-dataproject-registration-status/?$', set_dataproject_registration_status, name='set-dataproject-registration-status'), + url(r'^set-dataproject-visible-status/?$', set_dataproject_visible_status, name='set-dataproject-visible-status'), + url(r'^get-static-agreement-form-html/?$', get_static_agreement_form_html, name='get-static-agreement-form-html'), + url(r'^get-hosted-file-edit-form/?$', get_hosted_file_edit_form, name='get-hosted-file-edit-form'), + url(r'^get-hosted-file-logs/?$', get_hosted_file_logs, name='get-hosted-file-logs'), + url(r'^process-hosted-file-edit-form-submission/?$', process_hosted_file_edit_form_submission, name='process-hosted-file-edit-form-submission'), + url(r'^download-signed-form/?$', download_signed_form, name='download-signed-form'), + url(r'^change-signed-form-status/?$', change_signed_form_status, name='change-signed-form-status'), + url(r'^save-team-comment/?$', save_team_comment, name='save-team-comment'), + url(r'^set-team-status/?$', set_team_status, name='set-team-status'), + url(r'^delete-team/?$', delete_team, name='delete-team'), + url(r'^download-team-submissions/(?P[^/]+)/(?P[^/]+)/?$', download_team_submissions, name='download-team-submissions'), + url(r'^download-submission/(?P[^/]+)/?$', download_submission, name='download-submission'), + url(r'^host-submission/(?P[^/]+)/?$', host_submission, name='host-submission'), + url(r'^sync-view-permissions/(?P[^/]+)/?$', sync_view_permissions, name='sync-view-permissions'), + url(r'^grant-view-permission/(?P[^/]+)/(?P[^/]+)/?$', grant_view_permission, name='grant-view-permission'), + url(r'^remove-view-permission/(?P[^/]+)/(?P[^/]+)/?$', remove_view_permission, name='remove-view-permission'), + url(r'^get-project-participants/(?P[^/]+)/?$', ProjectParticipants.as_view(), name='get-project-participants'), + url(r'^(?P[^/]+)/?$', DataProjectManageView.as_view(), name='manage-project'), + url(r'^(?P[^/]+)/(?P[^/]+)/?$', manage_team, name='manage-team'), ] diff --git a/app/profile/urls.py b/app/profile/urls.py index 514d90c3..b8aa55f4 100644 --- a/app/profile/urls.py +++ b/app/profile/urls.py @@ -8,7 +8,7 @@ urlpatterns = [ url(r'^$', profile, name='profile'), - url(r'^send_confirmation_email/$', send_confirmation_email_view, name='send_confirmation_email'), - url(r'^update/$', update_profile, name='update'), - url(r'^signout/$', signout, name='signout'), + url(r'^send_confirmation_email/?$', send_confirmation_email_view, name='send_confirmation_email'), + url(r'^update/?$', update_profile, name='update'), + url(r'^signout/?$', signout, name='signout'), ] \ No newline at end of file diff --git a/app/projects/urls.py b/app/projects/urls.py index 8fa57c27..eeadedd1 100644 --- a/app/projects/urls.py +++ b/app/projects/urls.py @@ -23,19 +23,19 @@ urlpatterns = [ url(r'^$', list_data_projects, name='index'), - url(r'^autocomplete/hostedfileset/$', HostedFileSetAutocomplete.as_view(create_field='title'), name='hostedfileset-autocomplete'), - url(r'^submit_user_permission_request/$', submit_user_permission_request, name='submit_user_permission_request'), - url(r'^save_signed_agreement_form', save_signed_agreement_form, name='save_signed_agreement_form'), - url(r'^save_signed_external_agreement_form', save_signed_external_agreement_form, name='save_signed_external_agreement_form'), - url(r'^join_team/$', join_team, name='join_team'), - url(r'^leave_team/$', leave_team, name='leave_team'), - url(r'^approve_team_join/$', approve_team_join, name='approve_team_join'), - url(r'^reject_team_join/$', reject_team_join, name='reject_team_join'), - url(r'^create_team/$', create_team, name='create_team'), - url(r'^finalize_team/$', finalize_team, name='finalize_team'), - url(r'^signed_agreement_form/$', signed_agreement_form, name='signed_agreement_form'), - url(r'^download_dataset/$', download_dataset, name='download_dataset'), - url(r'^upload_challengetasksubmission_file/$', upload_challengetasksubmission_file, name="upload_challengetasksubmission_file"), - url(r'^delete_challengetasksubmission/$', delete_challengetasksubmission, name='delete_challengetasksubmission'), - url(r'^(?P[^/]+)/$', DataProjectView.as_view(), name="view-project"), + url(r'^autocomplete/hostedfileset/?$', HostedFileSetAutocomplete.as_view(create_field='title'), name='hostedfileset-autocomplete'), + url(r'^submit_user_permission_request/?$', submit_user_permission_request, name='submit_user_permission_request'), + url(r'^save_signed_agreement_form/?$', save_signed_agreement_form, name='save_signed_agreement_form'), + url(r'^save_signed_external_agreement_form/?$', save_signed_external_agreement_form, name='save_signed_external_agreement_form'), + url(r'^join_team/?$', join_team, name='join_team'), + url(r'^leave_team/?$', leave_team, name='leave_team'), + url(r'^approve_team_join/?$', approve_team_join, name='approve_team_join'), + url(r'^reject_team_join/?$', reject_team_join, name='reject_team_join'), + url(r'^create_team/?$', create_team, name='create_team'), + url(r'^finalize_team/?$', finalize_team, name='finalize_team'), + url(r'^signed_agreement_form/?$', signed_agreement_form, name='signed_agreement_form'), + url(r'^download_dataset/?$', download_dataset, name='download_dataset'), + url(r'^upload_challengetasksubmission_file/?$', upload_challengetasksubmission_file, name="upload_challengetasksubmission_file"), + url(r'^delete_challengetasksubmission/?$', delete_challengetasksubmission, name='delete_challengetasksubmission'), + url(r'^(?P[^/]+)/?$', DataProjectView.as_view(), name="view-project"), ]