Skip to content

Commit

Permalink
urls: use path() where appropriate
Browse files Browse the repository at this point in the history
re_path is not necessary here, in most cases.
  • Loading branch information
nikolas committed May 16, 2024
1 parent 1364cd9 commit 245b2b1
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lti_provider/urls.py
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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<assignment_name>.*)/(?P<pk>\d+)/$',
LTIRoutingView.as_view(), {}, 'lti-assignment-view'),
re_path(r'^assignment/(?P<assignment_name>.*)/$',
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<launch_id>[\w-]+)/$', configure,
name='lti-configure')
]

0 comments on commit 245b2b1

Please sign in to comment.