I trying to filter the list shown when I use the lupe in many to many fields (image bellow). Maybe a text search would be interesting too.
Any help?
Here's the code:
class PresentialModuleCourseInline(NestedStackedInline):
"""Module Course Presential Stacked Inline"""
model = Course.modules.through
raw_id_fields = ('module_course',)
extra = 1
def get_queryset(self, request):
return self.model.objects.filter(
module_course__type_course=ModuleCourse.PRESENTIAL) # Doesn't work