Fix more Django 2.0 deprecation warnings around URLconfs.
This commit is contained in:
@@ -3,6 +3,7 @@ API URLs.
|
||||
"""
|
||||
from django.conf.urls import include, url
|
||||
|
||||
app_name = 'commerce'
|
||||
urlpatterns = [
|
||||
url(r'^v0/', include('lms.djangoapps.commerce.api.v0.urls', namespace='v0')),
|
||||
url(r'^v1/', include('lms.djangoapps.commerce.api.v1.urls', namespace='v1')),
|
||||
|
||||
@@ -5,11 +5,12 @@ from django.conf.urls import include, url
|
||||
|
||||
from . import views
|
||||
|
||||
BASKET_URLS = [
|
||||
BASKET_URLS = ([
|
||||
url(r'^$', views.BasketsView.as_view(), name='create'),
|
||||
url(r'^(?P<basket_id>[\w]+)/order/$', views.BasketOrderView.as_view(), name='retrieve_order'),
|
||||
]
|
||||
], 'baskets')
|
||||
|
||||
app_name = 'commerce'
|
||||
urlpatterns = [
|
||||
url(r'^baskets/', include(BASKET_URLS, namespace='baskets')),
|
||||
url(r'^baskets/', include(BASKET_URLS)),
|
||||
]
|
||||
|
||||
@@ -3,16 +3,17 @@ from django.conf.urls import include, url
|
||||
|
||||
from . import views
|
||||
|
||||
COURSE_URLS = [
|
||||
COURSE_URLS = ([
|
||||
url(r'^$', views.CourseListView.as_view(), name='list'),
|
||||
url(r'^{}/$'.format(settings.COURSE_ID_PATTERN), views.CourseRetrieveUpdateView.as_view(), name='retrieve_update'),
|
||||
]
|
||||
], 'courses')
|
||||
|
||||
ORDER_URLS = [
|
||||
ORDER_URLS = ([
|
||||
url(r'^(?P<number>[-\w]+)/$', views.OrderView.as_view(), name='detail'),
|
||||
]
|
||||
], 'orders')
|
||||
|
||||
app_name = 'commerce'
|
||||
urlpatterns = [
|
||||
url(r'^courses/', include(COURSE_URLS, namespace='courses')),
|
||||
url(r'^orders/', include(ORDER_URLS, namespace='orders')),
|
||||
url(r'^courses/', include(COURSE_URLS)),
|
||||
url(r'^orders/', include(ORDER_URLS)),
|
||||
]
|
||||
|
||||
@@ -5,6 +5,7 @@ from django.conf.urls import url
|
||||
|
||||
from . import views
|
||||
|
||||
app_name = 'commerce'
|
||||
urlpatterns = [
|
||||
url(r'^checkout/cancel/$', views.checkout_cancel, name='checkout_cancel'),
|
||||
url(r'^checkout/error/$', views.checkout_error, name='checkout_error'),
|
||||
|
||||
Reference in New Issue
Block a user