i can not register new user .
User List
POST /auth/users/
HTTP 400 Bad Request Allow: GET, POST, HEAD, OPTIONS Content-Type: application/json Vary: Accept [ “Unable to create account.” ][quote=“tanjil, post:1, topic:18744, full:true”]
i can not register new user .
User List
POST /auth/users/
HTTP 400 Bad Request Allow: GET, POST, HEAD, OPTIONS Content-Type: application/json Vary: Accept [ “Unable to create account.” ]
[/quote]
from django.conf import settings
from django.db.models.signals import post_save
from django.dispatch import receiver
from store.models import Customer
@receiver(post_save, sender=settings.AUTH_USER_MODEL)
def create_customer_for_new_user(sender, **kwargs):
if kwargs[‘created’]:
Customer.objects.create(user=kwargs[‘instance’])