Я хочу создать регистрацию двух пользователей, используя одного пользовательского пользователя.
Вот мои MODELS.PY:
class User(AbstractBaseUser, PermissionsMixin):
email = models.EmailField(max_length=254, unique=True )
phone_number = PhoneNumberField(_("Phone number"),unique=True, blank=True, null=True)
username = models.CharField(_("Username"),max_length=254,unique=True)
is_staff = models.BooleanField(default=False)
is_superuser = models.BooleanField(default=False)
is_active = models.BooleanField(default=True)
last_login = models.DateTimeField(auto_now=True)
date_joined = models.DateTimeField(auto_now_add=True)
full_name = models.CharField(_("Full Name"), max_length=50, null=True)
date_of_birth = models.DateField(_("Birth date"), auto_now=False, auto_now_add=False, null=True, blank=True)
USERNAME_FIELD = 'email'
REQUIRED_FIELDS = ['username',]
class Aesthete(models.Model):
basicuser = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
is_verified = models.BooleanField(_("Verified"), default=False)
class Artist(models.Model):
basicuser = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
is_verified = models.BooleanField(_("Verified"), default=True)
debutsong = AudioField(upload_to='songsfile', blank=True,
ext_whitelist=(".mp3", ".wav", ".ogg"),
help_text=("Allowed type - .mp3, .wav, .ogg"))
. Посмотреть? Пожалуйста помоги. Спасибо.