AUTH_USER_MODEL = 'myapp.MyUser'
@receiver(post_save, sender=User)
def create_profile(sender, instance, created, **kwargs):
if created:
User.objects.create(user=instance)
@receiver(post_save, sender=User)
def save_profile(sender, instance, **kwargs):
instance.user.save()
print('hell')
id
password
last_login
is_superuser
username (Special, Unique Constraint)
first_name
last_name
email (Special)
is_staff
is_active
date_joined
AUTH_USER_MODEL = 'myapp.MyUser'
@receiver(post_save, sender=User)
def create_profile(sender, instance, created, **kwargs):
if created:
User.objects.create(user=instance)
@receiver(post_save, sender=User)
def save_profile(sender, instance, **kwargs):
instance.user.save()
print('hell')
id
password
last_login
is_superuser
username (Special, Unique Constraint)
first_name
last_name
email (Special)
is_staff
is_active
date_joined