from django.conf.urls import url, include
from rest_framework.routers import SimpleRouter

from .views import *

urlpatterns = [
    url(r'dict/$', DictView.as_view()),
    url(r'get_school/$', SchoolView.as_view()), # 学校管理
    url(r'get_category/$', CategoryView.as_view()), # 商品分类
    url(r'get_category_tree/$', CategoryTreeView.as_view()), # 商品分类
    url(r'get_wx_category/$', CategoryWXView.as_view()), # 小程序商品分类首页展示
    url(r'school_tree/$', SchoolTreeView.as_view()),
    url(r'area_tree/$', AreaTreeView.as_view()),
]

router = SimpleRouter()
router.register(r'config',ConfigViewSet)
router.register(r'school',SchoolViewSet)
router.register(r'grade',GradeViewSet)
router.register(r'student',StudentViewSet)
router.register(r'category',CategoryViewSet)

urlpatterns += router.urls
