1👍
✅
!= operator is not available inside filter(). You need to do:
queryset.filter(Q(from_user_id=from_user_id,deleteFlag=deleteFlag) | Q(to_user_id=to_user_id,deleteFlag=deleteFlag)).exclude(to_user_status=3)
Source:stackexchange.com