配置用户信息的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)的更多相关文章

  1. 【转】Django继承AbstractUser新建User Model时出现auth.User.groups: (fields.E304)错误

    错误详情如下: (venv) D:\workspace\music>python manage.py makemigrations SystemCheckError: System check ...

  2. auth.User.groups: (fields.E304) Reverse accessor for 'User.groups'

    创建表,运行下面命令,出错 makemigrations 原因:继承auth_user 解决方案 在settings.py文件添加 AUTH_USER_MODEL = "app名称.类名&q ...

  3. 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 ...

  4. (fields.E304) Reverse accessor for 'UserProfile.groups' clashes with reverse accessor for 'User.groups'.

    创建数据库models.py,在进行数据迁移时抛出一下异常: E:\Project\GuoJia>python manage.py makemigrations SystemCheckError ...

  5. Django继承AbstractUser新建UserInfor Model时出现fields.E304错误

    错误详情: SystemCheckError: System check identified some issues: ERRORS:app01.UserInfo.groups: (fields.E ...

  6. Django继承AbstractUser新建User Model时出现fields.E304错误

    错误内容如下 ERRORS: audit.UserProfile.groups: (fields.E304) Reverse accessor for 'UserProfile.groups' cla ...

  7. (三)Django继承AbstractUser新建User Model时出现fields.E304错误

    错误详情: auth.User.groups: (fields.E304) Reverse accessor for ‘User.groups’ clashes with reverse access ...

  8. django --fields.E304 错误解决方案

    今天在同一个表里,有多个不同的用户集时出现. fields.E304: Field name <field name> clashes with accessor for <fiel ...

  9. django继承修改 User表导致的问题 fields.E304(permissions/group都会有这样的错误)

    问题: django继承修改 User表时,进行migrations操作时会导致的问题 fields.E304(permissions/group都会有这样的错误)如图: 根源: django文档中有 ...

随机推荐

  1. 基于Maven构建的Spring+Mybatis项目

    项目的目录结构: 1.基于Maven构建Web项目 参考:基于Maven构建Web项目 2.导入项目依赖 Spring 核心容器(Beans.Core.Context.Context support. ...

  2. Libre 6004 「网络流 24 题」圆桌聚餐(网络流,最大流)

    Libre 6004 「网络流 24 题」圆桌聚餐(网络流,最大流) Description 假设有来自n个不同单位的代表参加一次国际会议.每个单位的代表数分别为 ri.会议餐厅共有m张餐桌,每张餐桌 ...

  3. 【洛谷P1462】通往奥格瑞玛的道路

    题目大意:给定一个 N 个点,M 条边的无向图,求从 1 号节点到 N 号节点的路径中,满足路径长度不大于 B 的情况下,经过顶点的点权的最大值最小是多少. 题解:最大值最小问题一般采用二分答案.这道 ...

  4. (转)在Eclipse中用TODO标签管理任务(Task)

    背景:eclipse是一款功能十分强大的编辑,如果能够熟练运用,必定事半功倍,但如果不求甚解,无疑是给自己制造麻烦. 1 标签的使用 1.1 起因 如上图所示,在程序中有很多todo的标签出现,但是却 ...

  5. 收藏:Win32消息机制

    Dos的过程驱动与Windows的事件驱动 在讲本程序的消息循环之前,我想先谈一下Dos与Windows驱动机制的区别: DOS程序主要使用顺序的,过程驱动的程序设计方法.顺序的,过程驱动的程序有一个 ...

  6. 使用 yield 减少内存消耗

    php 里面想要处理一个文本文件,有一个方法是使用 file() 函数,但是这个函数会读取文件所有内容,可能会导致占用很大内存. // 28.1 M 的文本文件, 200w 行 $file = 'st ...

  7. C++外观模式和组合模式

    外观模式应该是用的很多的一种模式,特别是当一个系统很复杂时,系统提供给客户的是一个简单的对外接口,而把里面复杂的结构都封装了起来.客户只需使用这些简单接口就能使用这个系统,而不需要关注内部复杂的结构. ...

  8. Python的生成器进阶玩法

    Python的生成器进阶玩法 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.yield的表达式形式 #!/usr/bin/env python #_*_coding:utf-8 ...

  9. Spring RedisTemplate操作-Set操作(5)

    @Autowired @Resource(name="redisTemplate") private RedisTemplate<String, String> rt; ...

  10. ASP.NET MVC学习(一)之路由篇Route

    什么是路由 通过[路由]配置,路由可以规定URL的特殊格式,使其达到特殊效果. 在ASP.NET MVC框架中,通过路由配置URL,使用户的URL请求可以映射到Controller下的action方法 ...