Skip to content

Commit

Permalink
Update regex for versioned guids
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlad0n20 committed Jan 10, 2025
1 parent bc6ceae commit e5b0f24
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
4 changes: 2 additions & 2 deletions api/chronos/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
urlpatterns = [
re_path(r'^journals/$', views.ChronosJournalList.as_view(), name=views.ChronosJournalList.view_name),
re_path(r'^journals/(?P<journal_id>[-0-9A-Za-z]+)/$', views.ChronosJournalDetail.as_view(), name=views.ChronosJournalDetail.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/submissions/$', views.ChronosSubmissionList.as_view(), name=views.ChronosSubmissionList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/submissions/(?P<submission_id>[-0-9A-Za-z]+)/$', views.ChronosSubmissionDetail.as_view(), name=views.ChronosSubmissionDetail.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/submissions/$', views.ChronosSubmissionList.as_view(), name=views.ChronosSubmissionList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/submissions/(?P<submission_id>[-0-9A-Za-z]+)/$', views.ChronosSubmissionDetail.as_view(), name=views.ChronosSubmissionDetail.view_name),
]
35 changes: 18 additions & 17 deletions api/preprints/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@
app_name = 'osf'

urlpatterns = [
# ^(?P<preprint_id>[A-Za-z0-9_]\d+)/$
re_path(r'^$', views.PreprintList.as_view(), name=views.PreprintList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/$', views.PreprintDetail.as_view(), name=views.PreprintDetail.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/bibliographic_contributors/$', views.PreprintBibliographicContributorsList.as_view(), name=views.PreprintBibliographicContributorsList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/citation/$', views.PreprintCitationDetail.as_view(), name=views.PreprintCitationDetail.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/citation/(?P<style_id>[-\w]+)/$', views.PreprintCitationStyleDetail.as_view(), name=views.PreprintCitationStyleDetail.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/contributors/$', views.PreprintContributorsList.as_view(), name=views.PreprintContributorsList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/contributors/(?P<user_id>\w+)/$', views.PreprintContributorDetail.as_view(), name=views.PreprintContributorDetail.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/files/$', views.PreprintStorageProvidersList.as_view(), name=views.PreprintStorageProvidersList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/files/osfstorage/$', views.PreprintFilesList.as_view(), name=views.PreprintFilesList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/identifiers/$', views.PreprintIdentifierList.as_view(), name=views.PreprintIdentifierList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/institutions/$', views.PreprintInstitutionsList.as_view(), name=views.PreprintInstitutionsList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/relationships/institutions/$', views.PreprintInstitutionsRelationship.as_view(), name=views.PreprintInstitutionsRelationship.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/relationships/node/$', views.PreprintNodeRelationship.as_view(), name=views.PreprintNodeRelationship.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/relationships/subjects/$', views.PreprintSubjectsRelationship.as_view(), name=views.PreprintSubjectsRelationship.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/review_actions/$', views.PreprintActionList.as_view(), name=views.PreprintActionList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/requests/$', views.PreprintRequestListCreate.as_view(), name=views.PreprintRequestListCreate.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/subjects/$', views.PreprintSubjectsList.as_view(), name=views.PreprintSubjectsList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+)/versions/$', views.PreprintVersionsList.as_view(), name=views.PreprintVersionsList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/$', views.PreprintDetail.as_view(), name=views.PreprintDetail.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/bibliographic_contributors/$', views.PreprintBibliographicContributorsList.as_view(), name=views.PreprintBibliographicContributorsList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/citation/$', views.PreprintCitationDetail.as_view(), name=views.PreprintCitationDetail.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/citation/(?P<style_id>[-\w]+)/$', views.PreprintCitationStyleDetail.as_view(), name=views.PreprintCitationStyleDetail.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/contributors/$', views.PreprintContributorsList.as_view(), name=views.PreprintContributorsList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/contributors/(?P<user_id>\w+)/$', views.PreprintContributorDetail.as_view(), name=views.PreprintContributorDetail.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/files/$', views.PreprintStorageProvidersList.as_view(), name=views.PreprintStorageProvidersList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/files/osfstorage/$', views.PreprintFilesList.as_view(), name=views.PreprintFilesList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/identifiers/$', views.PreprintIdentifierList.as_view(), name=views.PreprintIdentifierList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/institutions/$', views.PreprintInstitutionsList.as_view(), name=views.PreprintInstitutionsList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/relationships/institutions/$', views.PreprintInstitutionsRelationship.as_view(), name=views.PreprintInstitutionsRelationship.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/relationships/node/$', views.PreprintNodeRelationship.as_view(), name=views.PreprintNodeRelationship.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/relationships/subjects/$', views.PreprintSubjectsRelationship.as_view(), name=views.PreprintSubjectsRelationship.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/review_actions/$', views.PreprintActionList.as_view(), name=views.PreprintActionList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/requests/$', views.PreprintRequestListCreate.as_view(), name=views.PreprintRequestListCreate.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/subjects/$', views.PreprintSubjectsList.as_view(), name=views.PreprintSubjectsList.view_name),
re_path(r'^(?P<preprint_id>[A-Za-z0-9_]+_[Vv]\d+)/versions/$', views.PreprintVersionsList.as_view(), name=views.PreprintVersionsList.view_name),
]

0 comments on commit e5b0f24

Please sign in to comment.