diff --git a/lti_provider/urls.py b/lti_provider/urls.py index 60dafdd..946a64e 100644 --- a/lti_provider/urls.py +++ b/lti_provider/urls.py @@ -1,4 +1,4 @@ -from django.urls import re_path +from django.urls import path, re_path from lti_provider.views import ( LTIConfigView, LTILandingPage, LTIRoutingView, @@ -9,24 +9,24 @@ urlpatterns = [ - re_path(r'^config.xml$', LTIConfigView.as_view(), {}, 'lti-config'), - re_path(r'^auth$', LTIFailAuthorization.as_view(), {}, 'lti-fail-auth'), - re_path(r'^course/config$', - LTICourseConfigure.as_view(), {}, 'lti-course-config'), - re_path(r'^course/enable/$', - LTICourseEnableView.as_view(), {}, 'lti-course-enable'), - re_path(r'^landing/$', LTILandingPage.as_view(), {}, 'lti-landing-page'), - re_path('^grade/$', LTIPostGrade.as_view(), {}, 'lti-post-grade'), - re_path(r'^$', LTIRoutingView.as_view(), {}, 'lti-login'), + path('config.xml', LTIConfigView.as_view(), {}, 'lti-config'), + path('auth', LTIFailAuthorization.as_view(), {}, 'lti-fail-auth'), + path('course/config', + LTICourseConfigure.as_view(), {}, 'lti-course-config'), + path('course/enable/', + LTICourseEnableView.as_view(), {}, 'lti-course-enable'), + path('landing/', LTILandingPage.as_view(), {}, 'lti-landing-page'), + path('grade/', LTIPostGrade.as_view(), {}, 'lti-post-grade'), + path('', LTIRoutingView.as_view(), {}, 'lti-login'), re_path(r'^assignment/(?P.*)/(?P\d+)/$', LTIRoutingView.as_view(), {}, 'lti-assignment-view'), re_path(r'^assignment/(?P.*)/$', LTIRoutingView.as_view(), {}, 'lti-assignment-view'), # New pylti1.3 routes - re_path(r'^login/$', login, name='lti-login'), - re_path(r'^launch/$', launch, name='lti-launch'), - re_path(r'^jwks/$', get_jwks, name='jwks'), + path('login/', login, name='lti-login'), + path('launch/', launch, name='lti-launch'), + path('jwks/', get_jwks, name='jwks'), re_path(r'^configure/(?P[\w-]+)/$', configure, name='lti-configure') ]