Is_pro = models.BooleanField(default=False)Ĭurrently, these profiles don't have much features (fields), but in future it might get some extra fields.
Return self.filter(is_pro=True, **kwargs) Return self.filter(is_pro=False, **kwargs) Profile = models.OneToOneField(Profile, on_delete=models.CASCADE) Verified = models.BooleanField(default=False, verbose_name=_('Verified'))Īpproach 2: class Organisation(models.Model): Phone = models.CharField(_('Phone'), max_length=200, null=True, blank=True) User = models.OneToOneField(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) Profile = models.OneToOneField(ProProfile, on_delete=models.CASCADE) Name = models.CharField(_('Name'), max_length=50) Question: So I need help with deciding whether to create two separate profiles ( BasicProfile & ProProfile) for each type or create a single Profile and use a boolean field that says whether a profile is_proor not (much like the django's is_superuser boolean field)Īpproach 1: class Organisation(models.Model):
The title might seem very familiar (lots of related questions but I couldn't find relevant to my use case).