Skip to content

Commit

Permalink
better regex for ids with trailing slash in URL
Browse files Browse the repository at this point in the history
  • Loading branch information
coleshaw committed Mar 28, 2018
1 parent c01cd88 commit 76c5b9d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions assessment/assessment.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,29 +103,29 @@
"/banks/(.*)/assessmentstaken/(.*)/questions/(.*)/qti/?", "AssessmentTakenQuestionQTIDetails",
"/banks/(.*)/assessmentstaken/(.*)/questions/(.*)/status/?", "AssessmentTakenQuestionStatus",
"/banks/(.*)/assessmentstaken/(.*)/questions/(.*)/submit/?", "AssessmentTakenQuestionSubmit",
"/banks/(.*)/assessmentstaken/(.*)/questions/(.*)/?", "AssessmentTakenQuestionDetails",
"/banks/(.*)/assessmentstaken/(.*)/questions/(.*[^/])/?", "AssessmentTakenQuestionDetails",
"/banks/(.*)/assessmentstaken/(.*)/questions/?", "AssessmentTakenQuestions",
"/banks/(.*)/assessmentstaken/(.*)/finish/?", "FinishAssessmentTaken",
"/banks/(.*)/assessmentstaken/(.*)/?", "AssessmentTakenDetails",
"/banks/(.*)/assessmentstaken/(.*[^/])/?", "AssessmentTakenDetails",
"/banks/(.*)/assessments/(.*)/assessmentsoffered/?", "AssessmentsOffered",
"/banks/(.*)/assessmentsoffered/?", "AssessmentsOffered",
"/banks/(.*)/assessmentsoffered/(.*)/?", "AssessmentOfferedDetails",
"/banks/(.*)/assessments/(.*)/assignedbankids/(.*)/?", "AssessmentRemoveAssignedBankIds",
"/banks/(.*)/assessmentsoffered/(.*[^/])/?", "AssessmentOfferedDetails",
"/banks/(.*)/assessments/(.*)/assignedbankids/(.*[^/])/?", "AssessmentRemoveAssignedBankIds",
"/banks/(.*)/assessments/(.*)/assignedbankids/?", "AssessmentAssignedBankIds",
"/banks/(.*)/assessments/(.*)/items/(.*)/?", "AssessmentItemDetails",
"/banks/(.*)/assessments/(.*)/items/(.*[^/])/?", "AssessmentItemDetails",
"/banks/(.*)/assessments/(.*)/items/?", "AssessmentItemsList",
"/banks/(.*)/assessments/(.*)/?", "AssessmentDetails",
"/banks/(.*)/assessments/(.*[^/])/?", "AssessmentDetails",
"/banks/(.*)/assessments/?", "AssessmentsList",
"/banks/(.*)/items/(.*)/videoreplacement/?", "ItemVideoTagReplacement",
"/banks/(.*)/items/(.*)/qti/?", "ItemQTIDetails",
"/banks/(.*)/items/(.*)/?", "ItemDetails",
"/banks/(.*)/items/(.*[^/])/?", "ItemDetails",
"/banks/(.*)/items/?", "ItemsList",
"/banks/(.*)/?", "AssessmentBankDetails",
"/banks/?", "AssessmentBanksList",
"/hierarchies/roots/(.*)/?", "AssessmentHierarchiesRootDetails",
"/hierarchies/roots/(.*[^/])/?", "AssessmentHierarchiesRootDetails",
"/hierarchies/roots/?", "AssessmentHierarchiesRootsList",
"/hierarchies/nodes/(.*)/children/?", "AssessmentHierarchiesNodeChildrenList",
"/hierarchies/nodes/(.*)/?", "AssessmentHierarchiesNodeDetails"
"/hierarchies/nodes/(.*[^/])/?", "AssessmentHierarchiesNodeDetails"
)


Expand Down
4 changes: 2 additions & 2 deletions logging_/logging_.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

urls = (
"/logs/?", "LogsList",
"/logs/(.*)/logentries/(.*)/?", "LogEntryDetails",
"/logs/(.*)/logentries/(.*[^/])/?", "LogEntryDetails",
"/logs/(.*)/logentries/?", "LogEntriesList",
"/logs/(.*)/?", "LogDetails",
"/logs/(.*[^/])/?", "LogDetails",
"/genericlog/?", "GenericLogEntries"
)

Expand Down
6 changes: 3 additions & 3 deletions repository/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

urls = (
"/repositories/(.*)/assets/(.*)/contents/(.*)/stream/?", "AssetContentStream",
"/repositories/(.*)/assets/(.*)/contents/(.*)/?", "AssetContentDetails",
"/repositories/(.*)/assets/(.*)/contents/(.*[^/])/?", "AssetContentDetails",
"/repositories/(.*)/assets/(.*)/contents/?", "AssetContentsList",
"/repositories/(.*)/assets/(.*)/?", "AssetDetails",
"/repositories/(.*)/assets/(.*[^/])/?", "AssetDetails",
"/repositories/(.*)/assets/?", "AssetsList",
"/repositories/(.*)/?", "RepositoryDetails",
"/repositories/(.*[^/])/?", "RepositoryDetails",
"/repositories/?", "RepositoriesList"
)

Expand Down

0 comments on commit 76c5b9d

Please sign in to comment.