You can go with the following straightforward approach:
User.objects.exclude(pk__in=A.objects.values_list('current_user_id', flat=True))
A.objects.values_list('current_user_id', flat=True)
returns a list of User
model primary keys that are referenced by the A
model. User.objects.exclude(pk__in=...)
helps to get all other users.
In other words, this expression returns all users that are not related to A
.
Also see: