Make OneToOneSource.target nullable

This commit is contained in:
Yuri Prezument 2013-08-12 21:01:37 +03:00
parent 0a92e1ad8c
commit abe655e061

View File

@ -10,7 +10,8 @@ class OneToOneTarget(models.Model):
class OneToOneSource(models.Model):
name = models.CharField(max_length=100)
target = models.OneToOneField(OneToOneTarget, related_name='source')
target = models.OneToOneField(OneToOneTarget, related_name='source',
null=True, blank=True)
class OneToManyTarget(models.Model):