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):
>
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
2 matches
Mail list logo