2022年2月18日
摘要: 缓存装饰器 from django.core.cache import cache from hashlib import md5 import json def cache_response(view_func): """ 接口返回信息加入缓存机制 :param view_func: :retur 阅读全文
posted @ 2022-02-18 14:08 JentZhang 阅读(195) 评论(0) 推荐(0)
  2022年1月21日
摘要: 图片素材网 天堂网:https://www.ivsky.com/ 站长素材:https://sc.chinaz.com/ 路过图床:https://imgchr.com/ Hippopx:https://www.hippopx.com/zh Pexels:https://www.pexels.com 阅读全文
posted @ 2022-01-21 10:40 JentZhang 阅读(298) 评论(0) 推荐(0)
  2022年1月20日
摘要: Nginx中文日志出现乱码,如下所示: {\x22code\x22: \x22000\x22, \x22msg\x22: \x22\x5Cu6210\x5Cu529f\x22, \x22data\x22: {\x22store_id\x22: 322589}, \x22subcode\x22: \x 阅读全文
posted @ 2022-01-20 15:25 JentZhang 阅读(2081) 评论(0) 推荐(1)
  2021年11月30日
摘要: 一、引入 本文根据个人对于Flask项目的部署经历,详细描述了Flask项目的部署步骤,主要采用Nginx+Supervisor+Uwsgi的部署方式。仅供参考。 二、项目准备 准备好自己的项目代码,放至服务器指定目录,如:/data/project/okr/leadevo 三、配置uwsgi 在服 阅读全文
posted @ 2021-11-30 17:21 JentZhang 阅读(409) 评论(0) 推荐(0)
  2021年9月16日
摘要: 1.切换到需要基于变更的主分支 git checkout master 2.创建本地新分支并切换至新分支 git checkout -b new_branch 3.将新建分支推送至远程仓库 git push origin new_branch:new_branch 4.解决报错:当前分支没有跟踪信息 阅读全文
posted @ 2021-09-16 10:19 JentZhang 阅读(2308) 评论(0) 推荐(0)
  2021年3月15日
摘要: 1.先查询对应的提交历史,使用如下命令: git log --pretty=oneline 2.版本回退,使用如下命令: git reset --soft commitID //只删除commitID之后的提交记录log,代码的改动还在。 git reset --hard commitID //彻底 阅读全文
posted @ 2021-03-15 10:33 JentZhang 阅读(1363) 评论(0) 推荐(0)
  2021年1月8日
摘要: # <editor-fold desc="折叠后要显示的内容"> class Error4Code(object): """ Error code """ SUCCESS = ('10000', u'成功') API_PARAMS_ERROR = ('10001', u'API参数缺失或错误') A 阅读全文
posted @ 2021-01-08 17:25 JentZhang 阅读(1656) 评论(0) 推荐(0)
  2020年12月24日
摘要: 一、单纯的celery项目(异步+定时) 1 [program:jj-celery-worker] 2 command=celery -A main.app worker --loglevel=info 3 directory=/data/pyshell/bi/celery-app 4 enviro 阅读全文
posted @ 2020-12-24 15:50 JentZhang 阅读(486) 评论(1) 推荐(0)
  2020年10月30日
摘要: 例:将card_zt分支的内容替换成migrate的 # 切换到card_zt分支 git checkout card_zt # 再将本地的card_zt分支重置成migrate git reset --hard migrate # 最后推送到远程仓库分支 git push origin card_ 阅读全文
posted @ 2020-10-30 13:57 JentZhang 阅读(898) 评论(0) 推荐(1)
  2020年4月30日
摘要: 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Title</title> 6 <link rel="stylesheet" type="text/css" href="https://c 阅读全文
posted @ 2020-04-30 11:27 JentZhang 阅读(170) 评论(0) 推荐(0)