Adds a course_ids api that can filter by user role, since the courses api could not perform well enough for this, and returned much more data than we need. Additionally, adds a LazyPageNumberPagination to provide more accurate counts in the pagination response when using LazySequence with the queryset. BOM-897
17 lines
507 B
Python
17 lines
507 B
Python
"""
|
|
Course API URLs
|
|
"""
|
|
|
|
|
|
from django.conf import settings
|
|
from django.conf.urls import include, url
|
|
|
|
from .views import CourseDetailView, CourseIdListView, CourseListView
|
|
|
|
urlpatterns = [
|
|
url(r'^v1/courses/$', CourseListView.as_view(), name="course-list"),
|
|
url(r'^v1/courses/{}'.format(settings.COURSE_KEY_PATTERN), CourseDetailView.as_view(), name="course-detail"),
|
|
url(r'^v1/course_ids/$', CourseIdListView.as_view(), name="course-id-list"),
|
|
url(r'', include('course_api.blocks.urls'))
|
|
]
|