I think something like this would work:
class Department(models.Model):
name = models.CharField(max_length=20)
@property
def books(self):
booksets = list(team.booksets.all() for team in self.teams.all())
return list(bookset.books.all() for bookset in booksets)
But I don't have an easy way to test it.
Edit: An alternative I forgot to add:
You can use strings to refer to models in ForeignKey definitions. like so:
class BookSet(models.Model):
name = models.CharField(max_length=10)
team = models.ForeignKey('org.Team', related_name='booksets')
Then in you're other application you can freely import books.models
See the docs for more info.