1 2 3 4 5 ··· 16 下一页
摘要: 一. model type User struct { Name `gorm:"column:name;type:varchar(255);` Title `gorm:"column:title;type:varchar(255);` } 二. 查询 u := query.User cond := 阅读全文
posted @ 2025-12-28 18:20 _Q 阅读(2) 评论(0) 推荐(0)
摘要: 效果: 1. pip install pip install djangoql 2. settings.py INSTALLED_APPS = [ 'djangoql', ] 3. admin.py from django.contrib import admin from djangoql.adm 阅读全文
posted @ 2025-03-29 20:53 _Q 阅读(16) 评论(0) 推荐(0)
摘要: 一. 官方:https://github.com/go-gorm/datatypes 二. model type User struct { Name `gorm:"column:name;type:varchar(255);` Attributes datatypes.JSON `gorm:"co 阅读全文
posted @ 2025-01-19 22:51 _Q 阅读(449) 评论(0) 推荐(0)
摘要: 1. 是 conda 安装的 python 环境导致的失败 2. 解决: - 从官网重新安装个 python - 进入刚安装的 python 环境,重新 pip install pre-commit - 重新 pre-commit install (在这之前先把原本目录下的文件删除:C:\\User 阅读全文
posted @ 2024-12-22 17:37 _Q 阅读(105) 评论(0) 推荐(0)
摘要: 设置后重新commit/push,但隔一段可能会失效,需要重新设置 export GPG_TTY=$(tty) 参考: https://github.com/keybase/keybase-issues/issues/2798 阅读全文
posted @ 2024-12-22 17:01 _Q 阅读(75) 评论(0) 推荐(0)
摘要: 起因:执行数据库迁移操作时异常 Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right 阅读全文
posted @ 2024-11-27 00:10 _Q 阅读(201) 评论(0) 推荐(0)
摘要: # request.GET 是一个 不可变的 QueryDict 对象 # 使用 copy 创建一个新的副本数据修改 def IndexView(request): data = request.GET.copy() obj_id = data.get("obj_id") if obj_id: da 阅读全文
posted @ 2024-11-24 19:48 _Q 阅读(37) 评论(0) 推荐(0)
摘要: 1. 从原始仓库 fork 到自己的仓库 2. clone 自己仓库的代码到本地 git clone https://xxxx.git 3. 添加 upstream(git地址为原始仓库地址,添加后可对原始仓库进行拉取和推送) git remote add upstream https://xxx. 阅读全文
posted @ 2024-10-29 22:04 _Q 阅读(131) 评论(0) 推荐(0)
摘要: Crypto 模块导入时异常,安装下面加密模块解决(我的版本是 3.5.0): pip install pycryptodome 阅读全文
posted @ 2024-07-31 21:29 _Q 阅读(22) 评论(0) 推荐(0)
摘要: # admin.py from django.contrib import admin from django.contrib.admin import SimpleListFilter class MyStatusFilter(SimpleListFilter): # 设置过滤标题 title = 阅读全文
posted @ 2024-06-30 16:37 _Q 阅读(187) 评论(0) 推荐(0)
1 2 3 4 5 ··· 16 下一页