I wanted a Django model with 2 foreign keys from the same table. It's an event table which has 2 columns for employees: the 'home' and the 'away'. But I get this error: Error: One or more models did not validate...
class Team(models.Model):
name = models.CharField(max_length=200)
class Match(models.Model):
home = models.ForeignKey(Team)
away = models.ForeignKey(Team)
Any idea for this. Thanks!