I’m trying to add a ForeignKey field to a Django model using South. I’m getting the following error:
ValueError: You cannot add a null=False column without a default value.
I did, in fact, specify a default value for the field, but I’m not sure I did it correctly.
language = models.ForeignKey(Language, default=Language.objects.all()[0])
Should this work?
AFAIK Django won’t execute a QuerySet passed as a param, even if it’s limited to one element. You should try something like proposed in this post