What's The Difference Between OneToOne And Subclassing A Model In Django
For example: class Subdomain(Site): #fields here and class Subdomain(models.Model): site = models.OneToOne(Site) #fields here
Solution 1:
Models with a OneToOne
have an independent PK; submodels always use the PK of their supermodel.
Post a Comment for "What's The Difference Between OneToOne And Subclassing A Model In Django"