Django custom auth_user_model error

47 views
Skip to first unread message

Dave N

unread,
May 12, 2016, 8:14:21 PM5/12/16
to Django users
I've been trying to customize a django auth_user_model, and it has led me to the latest error/issue, which can be found here: http://stackoverflow.com/questions/37197771/django-attributeerror-usermanager-object-has-no-attribute-create-superuser

Please help get me out of Django config hell, so I can continue coding my project..

JJ Williamson

unread,
May 17, 2016, 6:08:44 AM5/17/16
to Django users
I'm still a bit of a noob but I say you go back to default settings and create another model which has a OnetoOne relationship with the User model that way you can add additional fields about a user account & etc and not break things on the backend. 


from django.contrib.auth.models import User

class Member(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
firstname = models.CharField(max_length=32,default="",verbose_name="First name")
Reply all
Reply to author
Forward
0 new messages