I have added a manager so to only return active messages in my Message model:

class ActiveMessageManager(models.Manager):
    def get_query_set(self):
        return super(ActiveMessageManager,
self).get_query_set().filter(date_removed__isnull=True).order_by('date_sent')

That works fine as far as I can tell, but later it breaks down when I
try to add more filtering, like this:

filter = Q( private=False ) | Q( private=True, user=user )
msgs = Message.active.filter( project=project.id ).filter( filter )

I get an InterfaceError exception:

Exception Type: InterfaceError
Exception Value:        Error binding parameter 2 - probably unsupported type.

I can do pretty much any part of the filtering by itself and it works,
just not all together like I need it.  What's the correct way to do
this sort of a query/filter?


Thanks,


-- 
Greg Donald
http://destiney.com/

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to