auth.User.groups: (fields.E304)
配置用户信息的models时,如果继承Abstractuser类时,报错:
ERRORS:
auth.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes with reverse accessor for 'UserInfo.groups'.
HINT: Add or change a related_name argument to the definition for 'User.groups' or 'UserInfo.groups'.
需要配置setting.py,添加:
AUTH_USER_MODEL = 'users.类名'
覆盖django的user表。
auth.User.groups: (fields.E304)的更多相关文章
- 【转】Django继承AbstractUser新建User Model时出现auth.User.groups: (fields.E304)错误
错误详情如下: (venv) D:\workspace\music>python manage.py makemigrations SystemCheckError: System check ...
- auth.User.groups: (fields.E304) Reverse accessor for 'User.groups'
创建表,运行下面命令,出错 makemigrations 原因:继承auth_user 解决方案 在settings.py文件添加 AUTH_USER_MODEL = "app名称.类名&q ...
- SystemCheckError: System check identified some issues: ERRORS: users.Test.groups: (fields.E304) Reverse accessor for 'Test.groups' clashes with reverse accessor for 'User.groups'.
Error Msg: SystemCheckError: System check identified some issues: ERRORS: users.Test.groups: (fields ...
- (fields.E304) Reverse accessor for 'UserProfile.groups' clashes with reverse accessor for 'User.groups'.
创建数据库models.py,在进行数据迁移时抛出一下异常: E:\Project\GuoJia>python manage.py makemigrations SystemCheckError ...
- Django继承AbstractUser新建UserInfor Model时出现fields.E304错误
错误详情: SystemCheckError: System check identified some issues: ERRORS:app01.UserInfo.groups: (fields.E ...
- Django继承AbstractUser新建User Model时出现fields.E304错误
错误内容如下 ERRORS: audit.UserProfile.groups: (fields.E304) Reverse accessor for 'UserProfile.groups' cla ...
- (三)Django继承AbstractUser新建User Model时出现fields.E304错误
错误详情: auth.User.groups: (fields.E304) Reverse accessor for ‘User.groups’ clashes with reverse access ...
- django --fields.E304 错误解决方案
今天在同一个表里,有多个不同的用户集时出现. fields.E304: Field name <field name> clashes with accessor for <fiel ...
- django继承修改 User表导致的问题 fields.E304(permissions/group都会有这样的错误)
问题: django继承修改 User表时,进行migrations操作时会导致的问题 fields.E304(permissions/group都会有这样的错误)如图: 根源: django文档中有 ...
随机推荐
- Codeforces 468C/469E 易错点
#include <stdio.h> #include <stdlib.h> typedef long long ll; int main() { ll x=1e17; ll ...
- MySql数据库类型bit等与JAVA中的对应类型【布尔类型怎么存】
用char(1):可以表示字符或者数字,但是不能直接计算同列的值.存储消耗1个字节 用tinyint:只能表示数字,可以直接计算,存储消耗2个字节 用bit: 只能表示0或1,不能计算,存储消耗小于等 ...
- 数据量越发庞大怎么办?新一代数据处理利器Greenplum来助攻
作者:李树桓 个推数据研发工程师 前言:近年来,互联网的快速发展积累了海量大数据,而在这些大数据的处理上,不同技术栈所具备的性能也有所不同,如何快速有效地处理这些庞大的数据仓,成为很多运营者为之苦恼的 ...
- 在ajax请求后台时在请求标头RequestHeader加token
情景:为了保证系统数据的安全性,一般前后台之间的数据访问会有授权与验证,这里的Token机制相对于Cookie支持跨域访问,在RESTful API里面,验证一般可以使用POST请求来通过验证,使服务 ...
- 阿里云(一)云存储OSS的命令行osscmd的安装和使用
一.安装Python 在Linux Shell里验证Python版本: $ python -V Python 2.7.10 二.安装OSScmd SDK osscmd是基于python 2.5.4(其 ...
- 网络基础知识(一)wireshark 三次握手实践
wireshark 三次握手简介 192.168.18.120 IP地址为我的本机虚拟机IP地址 过滤设置:ip.addr == 192.168.18.120 (ip.addr == 192.168. ...
- Div中嵌套一个div,怎么是里面的div居中?
盒子居中是在写样式中经常遇到的问题,在这里说个我经常使用的方法~ 利用绝对定位:
- 如何教会老婆写 Python ?
什么是code? code就就是一种语言,一种计算机能读懂的语言.计算机是一个傻逼,他理解不了默认两可的任何东西. 比如,你让你老公去买个西瓜,你老公会自己决定去哪里买,买几个,找个搞活动打折的买,总 ...
- 利用Python生成随机密码
#coding:utf-8 #利用python生成一个随机10位的字符串 import string import random import re list = list(string.lowerc ...
- malloc 函数详解
很多学过C的人对malloc都不是很了解,知道使用malloc要加头文件,知道malloc是分配一块连续的内存,知道和free函数是一起用的.但是但是: 一部分人还是将:malloc当作系统所提供的或 ...