For example:
class Subdomain(Site):
#fields 开发者_如何转开发here
and
class Subdomain(models.Model):
site = models.OneToOne(Site)
#fields here
Models with a OneToOne
have an independent PK; submodels always use the PK of their supermodel.
精彩评论