上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
摘要: 1在course/urls中添加子路由 router.register(r'path',views.PathViewSet) 2.在course/views中添加视图 class PathViewSet(viewsets.ModelViewSet): queryset = Path.objects. 阅读全文
posted @ 2020-10-13 20:01 王彬。 阅读(97) 评论(0) 推荐(0)
摘要: 1.路径表关系梳理 1.1路径表 class Path(Base): title=models.CharField('路径名',max_length=16) img=models.ImageField('路径图片',upload_to='path',null=True) desc=models.Ch 阅读全文
posted @ 2020-10-13 19:54 王彬。 阅读(201) 评论(0) 推荐(0)
摘要: 在 serializers.py中添加序列化 # -*- coding: utf-8 -*- from rest_framework import serializers from course.models import * class CourseTagSerializer(serializer 阅读全文
posted @ 2020-10-13 07:32 王彬。 阅读(205) 评论(0) 推荐(0)
摘要: 1在 course/models.py写表结构 from django.db import models class Base(models.Model): create_time=models.DateTimeField('创建时间',auto_now_add=True,null=True) up 阅读全文
posted @ 2020-10-12 21:36 王彬。 阅读(193) 评论(0) 推荐(0)
摘要: 1.vue微博回调空页面 微博回调空页面为: http://127.0.0.1:8888/oauth/callback/ 1.1 页面路径 components\oauth.vue <template> <div> <div v-show='visiable'> 绑定用户 用户名: <input t 阅读全文
posted @ 2020-10-11 19:45 王彬。 阅读(204) 评论(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-10-11 19:35 王彬。 阅读(188) 评论(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-10-11 19:29 王彬。 阅读(66) 评论(0) 推荐(0)
摘要: 1.微博回调接口 1.1oauth/urls.py 中添加路由 urlpatterns = [ path('weibo/callback/', views.OauthWeiboCallback.as_view()), # /oauth/weibo/callback/ ] 1.2 oauth/view 阅读全文
posted @ 2020-10-11 19:19 王彬。 阅读(714) 评论(0) 推荐(0)
摘要: 1.在Vue页面加载时动态发送请求获取微博授权url 1.1 在 components\common\lab_header.vue 中写oauth动态获取微博授权URL // 获取微博登录地址 oauth() { // 从后端获取 微博登录地址 oauth_post().then((resp) => 阅读全文
posted @ 2020-10-11 19:09 王彬。 阅读(120) 评论(0) 推荐(0)
摘要: 1在apps/oauth模块进行oatith认证 '''2.1 在apps文件夹下新建应用: oauth''' cd syl/apps python ../manage.py startapp oauth # 切换到apps文件夹下执行创建命令 '''2.2 添加子路由: oauth/urls.py 阅读全文
posted @ 2020-10-11 19:01 王彬。 阅读(98) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页