Files
edx-platform/common/djangoapps/course_modes/rest_api/v1/urls.py
Matt Tuchfarber c4cf0b9bb7 Refactor program type enrollment checks
Checking if a user was enrolled in a program type was using the `name`
field which is subject to be translated. This change allows for us to check by
the type's slug which will be constant. This also includes the addition
of api.py files for the course_modes, catalog, and programs apps.
2020-08-26 14:29:39 -04:00

25 lines
566 B
Python

"""
URL definitions for the course_modes v1 API.
"""
from django.conf import settings
from django.conf.urls import url
from course_modes.rest_api.v1 import views
app_name = 'v1'
urlpatterns = [
url(
r'^courses/{course_id}/$'.format(course_id=settings.COURSE_ID_PATTERN),
views.CourseModesView.as_view(),
name='course_modes_list'
),
url(
r'^courses/{course_id}/(?P<mode_slug>.*)$'.format(course_id=settings.COURSE_ID_PATTERN),
views.CourseModesDetailView.as_view(),
name='course_modes_detail'
),
]