Django admin $ is not a function 解决办法 solution : window.addEventListener("load", function () { (function ($) { // your code $ ... continue reading django zhuoyuebiji 2023/4/17 160
Pymysql charset.py return self._by_id[id] KeyError: 255 启动环境 mysql==8.0 python==3.6 pymysql==0.7.11 错误日志 (joyo) E:\git_stores\blog>python manage.py migra ... continue reading django zhuoyuebiji 2023/2/28 175
Django 2.2 sqlite3 迁移到 mysql8 报错:return instance._state.fields_cache[cache_name] KeyError: 'article' 错误日志 django 2.2(含 drf) sqlite3 转成 mysql5.7 ,执行 python manage.py loaddata data.json 时报错如下(有一个 article 模型) (joyoo) ... continue reading django zhuoyuebiji 2023/2/28 219
错误:django.db.utils.OperationalError: no such column: django_celery_results_taskresult.hidden 原因:本地库版本太低了,升级 django-celery-results 就好了 (joyoo2) yinzhuoqundeMacBook-Pro:joyoo zhuoqun$ pip list | grep djang ... continue reading django zhuoyuebiji 2021/12/11 534
Pycharm ModuleNotFoundError: No module named 'settings' pycharm 添加的 django 老项目,启动时报错: ModuleNotFoundError: No module named 'settings' 解决办法: django 项目 settings.py 所 ... continue reading django zhuoyuebiji 2021/12/1 756
Django admin: How to insert Inline between fields The positioning of the TabularInline, it would seem to be a simple task. Most of Django developers face this challenge w ... continue reading django zhuoyuebiji 2021/8/5 181
Django admin admin_order_field 自定义字段排序实现方法 模型 # admin.py class CustomerAdmin(admin.ModelAdmin): list_display = ('foo', 'number_of_orders') # models ... continue reading django zhuoyuebiji 2021/5/17 746
Django import_export 按用户类型显示导入导出按钮 @admin.register(InvestProject) # class InvestProjectAdmin(admin.ModelAdmin): class InvestProjectAdmin(ImportExportAc ... continue reading django zhuoyuebiji 2021/4/16 594
Celery 是否需要关注任务执行状态(全局和任务函数) 是否需要关注任务执行状态,这个要视具体的业务场景来看,如果对结果不关心,或者任务的执行本身会对数据产生影响,通过对数据的判断可以知道执行的结果那就不需要返回 celery 任务的退出状态,可以在配置文件里(settings.py ... continue reading django zhuoyuebiji 2021/3/4 170
Django import_export export 导出时新增自定义字段 环境 Django==2.2.x django-import-export==2.3.0 代码 from django.contrib import admin from .models import * f ... continue reading django zhuoyuebiji 2021/2/5 689