Django Admin Créer un superutilisateur
$ python manage.py createsuperuser
Defeated Dog
$ python manage.py createsuperuser
AUTH_USER_MODEL = 'myapp.MyUser'
print('hell')
@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()