This is an initial implementation that only allows retrieval of all threads for a course and only returns an easily computed subset of the fields that are needed, in order to keep this change from getting too large. JIRA: MA-641
24 lines
553 B
Python
24 lines
553 B
Python
"""
|
|
Discussion API URLs
|
|
"""
|
|
from django.conf import settings
|
|
from django.conf.urls import include, patterns, url
|
|
|
|
from rest_framework.routers import SimpleRouter
|
|
|
|
from discussion_api.views import CourseTopicsView, ThreadViewSet
|
|
|
|
|
|
ROUTER = SimpleRouter()
|
|
ROUTER.register("threads", ThreadViewSet, base_name="thread")
|
|
|
|
urlpatterns = patterns(
|
|
"discussion_api",
|
|
url(
|
|
r"^v1/course_topics/{}".format(settings.COURSE_ID_PATTERN),
|
|
CourseTopicsView.as_view(),
|
|
name="course_topics"
|
|
),
|
|
url("^v1/", include(ROUTER.urls)),
|
|
)
|