2👍
✅
You can use something like this:
Substitute.objects.filter(teacher__user=user.pk)
Source:stackexchange.com
2👍
You can use something like this:
Substitute.objects.filter(teacher__user=user.pk)