Re: How to create a new user with django rest framework and custom user model

2017-03-26 Thread Andréas Kühne
I think you have a few errors in your code. In views.py you write: User.objects.create_user( serialized.save() ) serialized.save() is probably calling User.objects.create - which you shouldn't do. If you want to create a user the way you are doing you will need to over

How to create a new user with django rest framework and custom user model

2017-03-26 Thread Aamu Padi
I have a custom user model and I am using django-rest-framework to create API models.py: class User(AbstractBaseUser, PermissionsMixin): email = models.EmailField( unique=True, max_length=254, ) first_name = models.CharField(max_length=15) last_name = models.CharFi