界面展示:
1 获取所有频道
-
1,配置路由(meiduo_admin/urls.py)
-
# 12.channel 管理 router = DefaultRouter() router.register(r'goods/channels', channel_views.ChannelViewSet, base_name="channels") urlpatterns += router.urls
-
-
2,添加视图(meiduo_admin/good/channel_views.py)
-
from rest_framework.viewsets import ModelViewSet from meiduo_admin.good import channel_serializers
-