上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: 0.课程主页面接口对应页面效果 1.课程类别接口开发 1.1 course/urls.py 添加路由 from django.urls import path, re_path from rest_framework.routers import DefaultRouter # 导入DRF得Defa 阅读全文
posted @ 2020-11-06 19:18 敏敏小朋友 阅读(73) 评论(0) 推荐(0)
摘要: 1.增加media文件配置 1.1 syl/settings.py MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') # /teach/shiyanlou_project/syl/media 1.2 syl/urls 阅读全文
posted @ 2020-11-06 19:03 敏敏小朋友 阅读(85) 评论(0) 推荐(0)
摘要: 1.课程主页面3张表 from django.db import models from utils.MyBaseModel import Base class CourseType(Base): title = models.CharField('课程类别', max_length=16) seq 阅读全文
posted @ 2020-11-06 19:00 敏敏小朋友 阅读(116) 评论(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 18:53 敏敏小朋友 阅读(64) 评论(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 18:51 敏敏小朋友 阅读(81) 评论(0) 推荐(0)
摘要: 1.vue微博回调空页面 注:微博回调空页面为: http://127.0.0.1:8888/oauth/callback/ 1.1 页面路径 components\oauth.vue <template> <div> <div v-show='visiable'> 绑定用户 用户名: <input 阅读全文
posted @ 2020-11-05 16:58 敏敏小朋友 阅读(68) 评论(0) 推荐(0)
摘要: 1.微博绑定用户接口 1.1 oauth/urls.py 中添加路由 urlpatterns = [ path('weibo/binduser/', views.OauthWeiboBindUser.as_view()), # /oauth/weibo/callback/ ] 1.2 oauth/v 阅读全文
posted @ 2020-11-05 16:49 敏敏小朋友 阅读(84) 评论(0) 推荐(0)
摘要: 1.vue微博回调空页面 注:微博回调空页面为: http://127.0.0.1:8888/oauth/callback/ 1.1 页面路径 components\oauth.vue <template> <div> <p>跳转中....</p> </div> </template> <scrip 阅读全文
posted @ 2020-11-05 16:47 敏敏小朋友 阅读(64) 评论(0) 推荐(0)
摘要: 1.微博回调接口 1.1 oauth/urls.py 中添加路由 urlpatterns = [ path('weibo/callback/', views.OauthWeiboCallback.as_view()), # /oauth/weibo/callback/ ] 1.2 oauth/vie 阅读全文
posted @ 2020-11-05 16:40 敏敏小朋友 阅读(79) 评论(0) 推荐(0)
摘要: 1.在Vue页面加载时动态发送请求获取微博授权url 1.1 在 components\common\lab_header.vue 中写oauth动态获取微博授权URL // 获取微博登录地址 oauth() { // 从后端获取 微博登录地址 oauth_post().then((resp) => 阅读全文
posted @ 2020-11-05 16:30 敏敏小朋友 阅读(63) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页