美文网首页
Django扩展user类时报错:auth.User.group

Django扩展user类时报错:auth.User.group

作者: scbigpanda | 来源:发表于2019-04-29 15:36 被阅读0次

    SystemCheckError: System check identified some issues:

    ERRORS:

    auth.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes with reverse accessor for 'User.groups'.

            HINT: Add or change a related_name argument to the definition for 'User.groups' or 'User.groups'.

    auth.User.user_permissions: (fields.E304) Reverse accessor for 'User.user_permissions' clashes with reverse accessor for 'Use

    r.user_permissions'.

            HINT: Add or change a related_name argument to the definition for 'User.user_permissions' or 'User.user_permissions'.

    users.User.groups: (fields.E304) Reverse accessor for 'User.groups' clashes with reverse accessor for 'User.groups'.

            HINT: Add or change a related_name argument to the definition for 'User.groups' or 'User.groups'.

    users.User.user_permissions: (fields.E304) Reverse accessor for 'User.user_permissions' clashes with reverse accessor for 'Us

    er.user_permissions'.

            HINT: Add or change a related_name argument to the definition for 'User.user_permissions' or 'User.user_permissions‘。

    解决:

    AUTH_USER_MODEL = 'users.User'

    users:你的app名称

    UserProfile:model名称

    相关文章

      网友评论

          本文标题:Django扩展user类时报错:auth.User.group

          本文链接:https://www.haomeiwen.com/subject/cfgynqtx.html