Re: Quick Query Question

2007-05-15 Thread Jeremy Dunck
On 5/15/07, Collin Anderson <[EMAIL PROTECTED]> wrote: > class Laptop(models.Model): > def laptops_out_on(date): > 'get a list of laptops out on a given day' > result = Laptop.objects.none() > for x in Rental.objects.filter(checkout__lte=date, > checkin__gte=date): >

Quick Query Question

2007-05-15 Thread Collin Anderson
I am working with a laptop rental program, and I was wondering if there is a better way to do this lookup. This works fine, but it seems like it could be better. from django.db import models class Laptop(models.Model): def laptops_out_on(date): 'get a list of laptops out on a given d