ERRORS:<class 'Salesman.admin.UsrMngUserAdmin'>: (admin.E005) Both 'fieldsets' and 'fields' are specified.
在使用django admin的过程中 遇到了这个错误
. Both 'fieldsets' and 'fields' are specified. django.core.management.base.SystemCheckError: SystemCheckError:
System check identified some issues: django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues: ERRORS:<class 'Salesman.admin.UsrMngUserAdmin'>: (admin.E005) Both 'fieldsets' and 'fields' are specified. System check identified issue ( silenced).
在使用django的过程中 我们可能会遇到这个错误,这是因为在你的admin中既有 fieldsets 也有fields 这是我们只需要把他们删除一个就可以运行了。fields和fieldsets是一个东西。
fields = ('user_name','real_name','password','phone_no','email','status','department',)# 编辑表单 没有设置登录密码 需要转换
fieldsets = (
['Main', {
'fields': ('user_name', 'real_name','password','phone_no','email','status',),
}],
['Advance', {
'classes': ('collapse',), # CSS
'fields': ('department',),
}]
ERRORS:<class 'Salesman.admin.UsrMngUserAdmin'>: (admin.E005) Both 'fieldsets' and 'fields' are specified.的更多相关文章
- Django 报错 admin.E408 admin.E409 admin.E410
报错内容 ERRORS: ?: (admin.E408) 'django.contrib.auth.middleware.AuthenticationMiddleware' must be in MI ...
- Django进阶Admin篇 - admin基本配置
django admin 是django自带的一个后台app,提供了后台的管理功能. 基础知识点: 一.认识ModelAdmin 管理界面的定制类,如需扩展特定的model界面,需要从该类继承 二.注 ...
- ipmitool -I lanplus -H 10.1.81.90 -U admin -P admin mc reset cold
ipmitool -I lanplus -H 10.1.81.90 -U admin -P admin mc reset cold
- <class 'Salesman.admin.UsrUserAdmin'>: (admin.E012) There are duplicate field(s) in 'fieldsets[0][1]'.
ieldsets = ( ['Main', { 'fields': ('user_name', 'real_name', 'concat_name','phone_no','charge_person ...
- Django Admin 后台Admin继承UserAdmin增加用户密码不显示明文和用户登录不了的解决方法
Django后台Admin继承UserAdmin增加用户不显示明文方法 1.在 models.py 中用户表 # 导包规范-1.Python标准模块 from django.db import mod ...
- <class 'blog.admin.CategoryAdmin'>: (admin.E108) The value of 'list_display[0]' refers to 'mame', which is not a callable, an attribute of 'CategoryAdmin', or an attribute or method on 'blog.Category'
系统反馈此类错误是因为行列映射时无法对应: 引起无法对应的原因有: 定义是缺少某列,定义时缩进导致,映射关系时缺少某列,(通俗讲列名对应不上). 这种错误多是python中的 因为其中对于空格的要求是 ...
- 吴裕雄--天生自然Django框架开发笔记:Django Admin 管理工具
Django 提供了基于 web 的管理工具. Django 自动管理工具是 django.contrib 的一部分.可以在项目的 settings.py 中的 INSTALLED_APPS 看到它: ...
- The value of 'filter_horizontal[0]' must be a many-to-many field. The value of 'raw_id_fields[0]' must be a foreign key or a many-to-many field.
在使用django admin的时候 我们遇到这个错误 <class 'Salesman.admin.UsrMngUserAdmin'>: (admin.E020) The value o ...
- Python开发【第十八篇】Web框架之Django【基础篇】
一.简介 Python下有许多款不同的 Web 框架,Django 是重量级选手中最有代表性的一位,许多成功的网站和APP都基于 Django. Django 是一个开放源代码的Web应用框架,由 P ...
随机推荐
- 字符串型MySQL查询条件需要注意的一点
最近在工作中遇到了数据库服务器产生很多读写队列的问题,于是要求大家开始优化我们的SQL语句. 下面是查询quotedata_history表中的code字段的SQL语句,其中code字段的类型是var ...
- [js插件]JqueryUI日期插件
引言 之前使用jqueryUi中的弹出框做了一个可拖拽的弹出登录框,也顺便将里面的常用的日期插件和文本框智能提示插件,也学习了一下. 使用方法 首先在项目中引入以下文件: <!-- 日期插件 默 ...
- How to run WPF – XBAP as Full Trust Application
Recently I work on WPF-XBAP application that will run from intranet website: This application must h ...
- 周赛 POJ 3934 Queue
Description Linda is a teacher in ACM kindergarten. She is in charge of n kids. Because the dinning ...
- appium+python自动化24-滑动方法封装(swipe)
swipe介绍 1.查看源码语法,起点和终点四个坐标参数,duration是滑动屏幕持续的时间,时间越短速度越快.默认为None可不填,一般设置500-1000毫秒比较合适. swipe(self, ...
- Java垃圾回收精粹 — Part2
Java垃圾回收精粹分4个部分,本篇是第2部分.在第2部分里介绍了Hotspot中的堆结构.对象分配以及次要回收. Hotspot中的堆结构 理解不同的收集器的工作方式,是探讨Java堆结构如何支持分 ...
- Interactive Messager
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- jenkins使用slave报编码错误[WARNING] File encoding has not been set, using platform encoding ANSI_X3.4-1968, i.e. build is platform dependent!
jenkins:master-slave 模式: master编码配置: slave编码配置: 可以看出master 和 slave的配置是一样的,但是当项目在slave上执行的时候,偶尔会报如下错误 ...
- IIS - 无后缀(无扩展名)的MIME类型配置
添加一个新的 MIME 类型即可. 文件扩展名:. MIME类型:application/octet-stream
- 多种非接触卡 ATQA 字节说明
原文地址 13.56 MHz RFID Software An Open Source implementation of an NFC stack, and various related ut ...