摘要:
0.播放页面 1.视频播放页面接口开发 1.1 course/urls.py 添加路由 router.register(r'sections', views.SectionsViewSet) 1.2 course/serializers.py 写序列化器 from rest_framework im 阅读全文
posted @ 2020-11-06 21:36
是SY呀
阅读(117)
评论(0)
推荐(0)
摘要:
0.具体课程章节页面 1.获取具体课程章节 信息 1.1 路由地址 http://192.168.56.100:8888/course/course/2/ 1.2 测试结果 返回结果展示 { "id": 1, "course_type": "免费", "course_tag": [ { "id": 阅读全文
posted @ 2020-11-06 21:26
是SY呀
阅读(106)
评论(0)
推荐(0)
摘要:
0.课程主页面接口对应页面效果 1.课程类别接口开发 1.1 course/urls.py 添加路由 from django.urls import path,re_path from rest_framework.routers import DefaultRouter from . import 阅读全文
posted @ 2020-11-06 20:49
是SY呀
阅读(106)
评论(0)
推荐(0)
摘要:
1.增加media文件配置 1.1 syl/settings.py MEDIA_URL='/media/' MEDIA_ROOT=os.path.join(BASE_DIR, 'media') #/root/shiyanlou_project/syl/media 1.2 syl/urls.py fr 阅读全文
posted @ 2020-11-06 20:32
是SY呀
阅读(81)
评论(0)
推荐(0)
摘要:
1.课程主页面3张表 models from django.db import models from utils.MyBaseModel import Base class CourseType(Base): title = models.CharField('课程类别', max_length= 阅读全文
posted @ 2020-11-06 20:23
是SY呀
阅读(90)
评论(0)
推荐(0)
摘要:
1.syl/utils/MyBaseModel.py增加抽象基类 from django.db import models class Base(models.Model): create_time = models.DateTimeField('创建时间', auto_now_add=True, 阅读全文
posted @ 2020-11-06 20:15
是SY呀
阅读(66)
评论(0)
推荐(0)
摘要:
1.创建course模型 1.1 创建用户模型course python ../manage.py startapp course # 创建course模型 1.2 在setting.py中注册course模型(第一步) INSTALLED_APPS = [ 'course.apps.CourseC 阅读全文
posted @ 2020-11-06 20:13
是SY呀
阅读(111)
评论(0)
推荐(0)

浙公网安备 33010602011771号