MA-1882 adding course api to regex

This commit is contained in:
Sanford Student
2016-02-11 16:03:52 -05:00
parent 90e1b62649
commit b92c12cbe5

View File

@@ -8,7 +8,7 @@ from opaque_keys import InvalidKeyError
from opaque_keys.edx.locations import SlashSeparatedCourseKey
COURSE_REGEX = re.compile(r'^.*?/courses/{}'.format(settings.COURSE_ID_PATTERN))
COURSE_REGEX = re.compile(r'^.*?/(api/courses/v1/)?courses/{}'.format(settings.COURSE_ID_PATTERN))
def safe_get_host(request):