On 5/18/07, Olivier Guilyardi <[EMAIL PROTECTED]> wrote:
...
> Okay, so I suppose a workaround is to pass offset and length as arguments to
> my_query()
>
...
> I suppose I may also try to extend the QuerySet class to add my own method. 
> But
> this might get rather complex AFAICS in db.models.query.

If you give a better idea of what you're trying to accomplish, there
may be an easier way.

Have a look at db.query.Q, for example, which can be used to build
queries in a flexible way, for example:
http://www.djangoproject.com/documentation/db-api/#complex-lookups-with-q-objects

You might be able to get away with something like

class MyManager(models.Manager):
  def get_query_set(self):
     qs = super(MyManager, self).get_query_set()
     return 
qs.filter(Q(your__lookups__exact='Foo')&Q(doing_magic__ilike='this'))

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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