![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
django
文章平均质量分 61
健弟弟
努力努力努力
展开
-
记录面试相关东西
面试 1.面向对象 三大特性:封装,继承,多态 封装: 函数,属性,同一类的要封装到一起,字段封装到对象里。 应用:自定义分页(当前页有多少数据,有多少页,只需要起始和结束页传进来),drf源码中请求进来,将原来的request和认证的所有对象封装到一起 as_view() --> view() --> dispatch() --> initialize_request()对request进行封装 继承: drf中视图继承APIView,modelForm中继承django的form.M原创 2021-04-19 21:28:59 · 191 阅读 · 0 评论 -
git 相关操作
上传克隆 提交 git init # 初始化文件夹 git init dirName # 初始化指定文件夹 git status # 查看状态 git add . # 提交暂存区 git commit -m '注释' # 把暂存区的所有提交到版本库 git push # 上传远端 git config --global user.email "xxx@126.com" # 作者信息 git config --global user.name "ajia原创 2021-04-19 21:20:23 · 75 阅读 · 0 评论 -
Django小程序微信支付与微信退款
Django小程序微信支付与微信退款 1.微信支付 1.1前期准备 需要准备微信支付的配置参数 # 微信支付的配置参数 client_appid = '' # 小程序appid client_secret = '' # 小程序secret Mch_id = '' # 商户号 Mch_key = '' # 商户Key order_url = 'https://api.mch.weixin.qq.com/pay/unifiedorder' # 订单地址 1.2用户下单 #下单接口 from dja原创 2020-10-21 11:30:47 · 517 阅读 · 0 评论 -
Django2.2中使用celery
Django2.2中使用celery 1.启动Redis 2.在settings中添加 CELERY_BROKER_URL = 'redis://localhost:6379/0' CELERY_RESULT_BACKEND = 'redis://localhost:6379/1' CELERY_ACCEPT_CONTENT = ['application/json'] CELERY_RESULT_SERIALIZER = 'json' CELERY_TASK_SERIALIZER = 'json' CEL原创 2020-07-13 13:05:29 · 778 阅读 · 1 评论