feat: 添加course api接口
This commit is contained in:
parent
542a64a52f
commit
83a20df7f4
|
@ -1,11 +1,10 @@
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
from rest_framework import routers
|
from rest_framework import routers
|
||||||
from apps.edu.views import CertificateViewSet
|
from apps.edu.views import CertificateViewSet, CourseViewSet
|
||||||
|
|
||||||
API_BASE_URL = 'api/edu/'
|
API_BASE_URL = "api/edu/"
|
||||||
HTML_BASE_URL = 'edu/'
|
HTML_BASE_URL = "edu/"
|
||||||
router = routers.DefaultRouter()
|
router = routers.DefaultRouter()
|
||||||
router.register('certificate', CertificateViewSet, basename="certificate")
|
router.register("certificate", CertificateViewSet, basename="certificate")
|
||||||
urlpatterns = [
|
router.register("course", CourseViewSet, basename="course")
|
||||||
path(API_BASE_URL, include(router.urls))
|
urlpatterns = [path(API_BASE_URL, include(router.urls))]
|
||||||
]
|
|
||||||
|
|
Loading…
Reference in New Issue