[Answered ]-Django inline formset filters in manytomany relationship through another model

2👍

Unless I’m overlooking something, you can do this with the queryset method on StudentEnrolmentsInline:

def queryset(self, request):
    current = Cycle.objects.latest() # or whatever to get the current cycle
    qs = super(StudentEnrolmentsInline, self).queryset(request)
    return qs.filter(school_class__cycle=current)

Leave a comment