摘要:
首先开始配置settings MEDIA_URL='/media/' #媒体文件的地址 MEDIA_ROOT=os.path.join(BASE_DIR,'media') 1.model 模块 from django.db import models from utils.MyBaseModel i 阅读全文
摘要:
1.1 oauth/urls.py 中添加路由 urlpatterns = [ path('weibo/callback/', views.OauthWeiboCallback.as_view()), # /oauth/weibo/callback/ ] 1.2 oauth/views.py 中添加 阅读全文
摘要:
1.在Vue页面加载时动态发送请求获取微博授权url 1.1 在 components\common\lab_header.vue 中写oauth动态获取微博授权URL // 获取微博登录地址 oauth() { // 从后端获取 微博登录地址 oauth_post().then((resp) => 阅读全文
摘要:
1.vue 微博回填空页面 注:微博回调空页面为: http://127.0.0.1:8888/oauth/callback/ 1.1 页面路径 components\oauth.vue <template> <div> <div v-show='visiable'> 绑定用户 用户名: <inpu 阅读全文
摘要:
1.1 oauth/urls.py 中添加路由 urlpatterns = [ path('weibo/binduser/', views.OauthWeiboBindUser.as_view()), # /oauth/weibo/callback/ ] 1.2 oauth/views.py 中添加 阅读全文
摘要:
1.celery配置与基本使用 1.1 安装celery pip install celery @ https://github.com/celery/celery/tarball/master 1.2 新建celery/main.py配置celery # celery_task/main.py i 阅读全文
摘要:
1.vue检查用户名是否重复 前端函数如下,js方法代码无需更改,前端代码逻辑在components\common\lab_header.vue 只需要修改components\axios_api\http.js中调用的后端地址 // axios.defaults.baseURL = "http:/ 阅读全文
摘要:
1.注册容联云账号 1.1 注册账号 https://www.yuntongxun.com/user/login 1.2 登录即可看到开发者账号信息 1.3 添加测试账号 2.使用容联云发送代码测试 '''1. 安装容联云sdk''' pip install ronglian_sms_sdk # 免 阅读全文
摘要:
1.1.user/urls.py 中添加路由 urlpatterns = [ path('register/', views.RegisterView.as_view()), # 注册视图, /user/register/ ] 1.2.user/views.py 中写注册视图函数 class Reg 阅读全文
摘要:
1.django 缓存设置 django的六种缓存(mysql+redis) :https://www.cnblogs.com/xiaonq/p/7978402.html#i6 1.1 安装Django缓存模块 pip install django-redis==4.12.1 1.2 syl/set 阅读全文