This will remove imports from __future__ that are no longer needed. https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
25 lines
563 B
Python
25 lines
563 B
Python
"""
|
|
Commerce URLs
|
|
"""
|
|
|
|
|
|
from django.conf import settings
|
|
from django.conf.urls import include, url
|
|
|
|
from . import views
|
|
|
|
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 = ([
|
|
url(r'^(?P<number>[-\w]+)/$', views.OrderView.as_view(), name='detail'),
|
|
], 'orders')
|
|
|
|
app_name = 'v1'
|
|
urlpatterns = [
|
|
url(r'^courses/', include(COURSE_URLS)),
|
|
url(r'^orders/', include(ORDER_URLS)),
|
|
]
|