Let's say I have three models that represent a soccer team, a soccer team event, and an event venue. Each football team has several events. Not every event takes place.
class FootballTeam(models.Model): team_name = models.CharField() def get_latest_location(self):
How to write a Django request to get the latest EventLocation event in FootballTeam? In other words, how do I sort a set of models according to the date of the parent model?
source share