Я определил ниже модель и получаю
ошибка: You are trying to add a non-nullable field 'user' to videodata without a default; we can't do that
models.py
class User(Model):
userID = models.IntegerField()
userName = models.CharField(max_length=40)
email = models.EmailField()
class Meta:
ordering = ['userName']
verbose_name = 'User MetaData'
verbose_name_plural = 'Users MetaData'
def __unicode__(self):
return str(self.userName)
class VideoData(Model):
video = models.CharField(max_length=40)
time = models.IntegerField()
user = models.ForeignKey(User, related_name='User')
class Meta:
verbose_name = 'User_Video MetaData'
Где я делаю неправильно????