python - Django 1.6 Issue when trying to add fields to User Object with AbstractUser -
i trying add couple of fields user model in django 1.6. rather add them directly user object rather make profile. however, having following issues:
models.py:
class employee(abstractuser): emp_irc_name = models.charfield(max_length="25") emp_forum_username = models.charfield(max_length="25")
error output:
(bot)one@chat-dash /home/git/bot_server/bot_server $ python manage.py syncdb commanderror: 1 or more models did not validate: auth.user: accessor m2m field 'groups' clashes related m2m field 'group.user_set'. add related_name argument definition 'groups'. auth.user: accessor m2m field 'user_permissions' clashes related m2m field 'permission.user_set'. add related_name argument definition 'user_permissions'. bot_data.employee: accessor m2m field 'groups' clashes related m2m field 'group.user_set'. add related_name argument definition 'groups'. bot_data.employee: accessor m2m field 'user_permissions' clashes related m2m field 'permission.user_set'. add related_name argument definition 'user_permissions'. (bot)one@chat-dash /home/git/bot_server/bot_server $
you need tell django not create standard auth.user model. specifying auth_user_model
in settings.py:
auth_user_model = 'bot_data.employee'
Comments
Post a Comment