from django.contrib.auth import get_user_model from django.contrib.auth.models import AbstractUser class MyUser(AbstractUser): pass class Landlord(models.Model): user = models.OneToOneField(get_user_model(), on_delete=models.CASCADE) #other fields def __str__(self): # **Err....
21 abr. 2020 a las 21:31