'django.contrib.auth.middleware.AuthenticationMiddleware' must be in MIDDLEWARE in order to use the admin application. 错误环境 django 1.11 迁移到 django 2 错误日志 ERRORS: ?: (admin.E408) 'django.contrib.auth.middleware.AuthenticationMid ... continue reading django zhuoyuebiji 2020/5/20 419
Django2 TypeError: RedirectView() received an invalid keyword 're_path'. as_view only accepts arguments that are already attributes of the class. django2 报错: TypeError: RedirectView() received an invalid keyword 're_path'. as_view only accepts arguments t ... continue reading django zhuoyuebiji 2020/5/20 490
How to Add a Text Filter to Django Admin(筛选条件自定义输入) When creating a new Django Admin page a common conversation between the developer and the support personal might sound l ... continue reading django zhuoyuebiji 2020/5/19 167
Django2.2 + mysql + pymysql: django.db.utils.InternalError: (1366, "Incorrect string value 解决方案 现象: 部分含 emoji 表情的字符无法存入 mysql 前提: 数据库已设置字符格式 utf8mb4 错误信息: 解决方案: django settings.py  ... continue reading django zhuoyuebiji 2020/5/7 199
Django runserver log add client(request) ip source: https://code.djangoproject.com/ticket/16301 django source code location ( django 2.2 ): ..\L ... continue reading django zhuoyuebiji 2020/5/4 182
Why you should use the Django admin: 9 tips This writing is inspired by a comment on Reddit concerning my recent post: “The problem is that ever ... continue reading django zhuoyuebiji 2020/4/23 178
Django DateTimeField 指定日期筛选(How can I filter a date of a DateTimeField in Django) models.py class AnchorBindAgent(models.Model): """ 主播绑定到代理,绑定规则 """ end_time_default = (timezon ... continue reading django zhuoyuebiji 2020/4/23 921
Pycharm2019.2 专业版 导入及配置已存在的 Django 项目 添加 Django 项目到 project 区域 打开项目 选择项目 追加到当前窗口 查看 配置 Django 项目 编辑 Congfigrations Co ... continue reading django zhuoyuebiji 2020/4/17 636
Django Admin Show Image from Imagefield(Django admin 图片预览) 在 Django 管理后台中,图片字段(ImageField)默认是显示路径,期望能看到图片预览图。 编写 ImageWidgetAdmin 继承 admin.ModelAdmin, 编写自 ... continue reading django zhuoyuebiji 2020/4/15 779
Django2.2 反向解析 admin 的 url https://docs.djangoproject.com/zh-hans/2.2/ref/contrib/admin/#admin-reverse-urls 代码里使用: from django.urls imp ... continue reading django zhuoyuebiji 2020/4/14 311