[Answer]-Get objects with similar foreign key

1👍

That’s not what choices are for – apart from anything else, that definition is at the class level, and is evaluated well before you’ve instantiated the object whose league you’re hoping to use.

home_team should be a ForeignKey to Team. The best way to constrain the choices of teams to the relevant league is to do it in the form, rather than in the model.

Leave a comment