Thanks for answer

Finally I get correct result, using objects.extra method:

 Service.objects.extra(where=['sms_service.id not in (select
sms_userservices.service_id from sms_userservices where
sms_userservices.user_id = 9)'],tables=['sms_userservices']).distinct()

Maybe not so clean and tasty but works.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to