3

For example:

class Subdomain(Site):
    #fields here

and

class Subdomain(models.Model):
    site = models.OneToOne(Site)
    #fields here
readevalprint
  • 45
  • 1
  • 4

1 Answers1

6

Models with a OneToOne have an independent PK; submodels always use the PK of their supermodel.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
  • What is the semantic difference between the two? When would you use one over the other? – gjb Nov 29 '12 at 23:59