1👍
✅
You can do this by overriding the save
method from the User
model.
def save(self, *args, **kwargs):
super().save(*args, **kwargs)
if self.user_type == 'customer':
CustomerProfile.objects.create(user=self)
elif self.user_type == 'employee':
EmployeeProfile.objects.create(user=self)
Source:stackexchange.com