摘要:
一. 官方:https://github.com/go-gorm/datatypes 二. model type User struct { Name `gorm:"column:name;type:varchar(255);` Attributes datatypes.JSON `gorm:"co 阅读全文
摘要:
1. 是 conda 安装的 python 环境导致的失败 2. 解决: - 从官网重新安装个 python - 进入刚安装的 python 环境,重新 pip install pre-commit - 重新 pre-commit install (在这之前先把原本目录下的文件删除:C:\\User 阅读全文
摘要:
设置后重新commit/push,但隔一段可能会失效,需要重新设置 export GPG_TTY=$(tty) 参考: https://github.com/keybase/keybase-issues/issues/2798 阅读全文
摘要:
起因:执行数据库迁移操作时异常 Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right 阅读全文
摘要:
# request.GET 是一个 不可变的 QueryDict 对象 # 使用 copy 创建一个新的副本数据修改 def IndexView(request): data = request.GET.copy() obj_id = data.get("obj_id") if obj_id: da 阅读全文
摘要:
1. 从原始仓库 fork 到自己的仓库 2. clone 自己仓库的代码到本地 git clone https://xxxx.git 3. 添加 upstream(git地址为原始仓库地址,添加后可对原始仓库进行拉取和推送) git remote add upstream https://xxx. 阅读全文
摘要:
Crypto 模块导入时异常,安装下面加密模块解决(我的版本是 3.5.0): pip install pycryptodome 阅读全文
摘要:
# admin.py from django.contrib import admin from django.contrib.admin import SimpleListFilter class MyStatusFilter(SimpleListFilter): # 设置过滤标题 title = 阅读全文
摘要:
1. 登录服务器,进入本地mysql数据库,修改 root 账号访问权限为:%,表示所有IP都可以连接 use mysql; update user set host="%" where user="root"; // 刷新权限 FLUSH PRIVILEGES; 2. 查看是否修改成功: sele 阅读全文
摘要:
1. 安装 rdbtools pip install rdbtools 2. 安装 python-lzf pip install python-lzf 3. rdb 文件导出为json文件 rdb --c json 路径名称/备份文件名称.rdb -f xx.json 4. 解析json文件 wit 阅读全文