Django4.1
class Exercise(NameMixin,
UrlMixin,
PriorityMixin,
CommentMixin):
unit = models.ForeignKey('vocabulary_units.Unit',
on_delete=models.CASCADE,
null=True, )
class Phrase(models.Model):
exercise = models.ForeignKey('vocabulary_exercises.Exercise',
on_delete=models.CASCADE,
null=True,
blank=False)
@property
def unit(self):
result = self.exercise.unit
return result
A phase belongs to an exercise, excercise belongs to a unit.
The problem is that in the admin site I'd like to organise for phrases a filter by unit.
Is it possible?