class MyUser(AbstractBaseUser):
...
content_type = models.ForeignKey(ContentType, limit_choices_to={"model__in": ("agentprofile", "clientprofile"))
object_id = models.PositiveIntegerField()
profile = generic.GenericForeignKey('content_type', 'object_id')
class AgentProfile(models.Model):
license_number = models.CharField(max_length=50, blank=True)
class ClientProfile(models.Model):
address = models.CHarField(max_length=250)
我有3个模型:MyUser(自定义用户模型),ClientProfile,AgentProfile。如何在MyUser管理页面上编辑ClientProfile / AgentProfile(如内联)?