class Incubator(models.Model):
name = models.CharField(max_length=30)
category = models.CharField(max_length=30, blank=True)
acceptanceRate = models.DecimalField(max_digits=5, decimal_places=2, blank=True, null=True)
funding = models.IntegerField()
programLength = models.DecimalField(max_digits=4, decimal_places=2)
kloutScore = models.IntegerField(blank=True, null=True)
companies = models.ManyToManyField(Company, blank=True)
def __unicode__(self):
return self.name
整数フィールドのいずれかを空白のままにすると、次のようなエラーが表示され続けます。
IntegrityError at /admin/incubators/incubator/add/
incubators_incubator.kloutScore may not be NULL
blank=true と null=true を入れることで、その問題が解決すると思いましたか?