Hi Serek,
Try this
def doMagic(self):
date = '2010-05-04'
#//here I need to take 10 conencted Bbb objects whcich data is less
then date
previous10days = Bbb.objects.filter(date__lt=date).order_by('data')
Also read up about managers
Just refer to the field name, you don't need the class:
prev = self.bbb_set.filter(date__lt=date)
Take a look to field lookup rules:
http://docs.djangoproject.com/en/dev/topics/db/queries/#field-lookups-intro
Excerpts from serek's message of Wed Feb 16 20:51:05 -0200 2011:
> Hi
>
> I have not
2 matches
Mail list logo