Book.objects.filter(author__name='some name').filter(publisher__name='editorname') Then you filter a date field with a timedelta that matches the time that you want.
It's really simple actually. Hope that helps, Michael On Tue, Mar 25, 2008 at 2:23 PM, Vladimir Sanjinez <[EMAIL PROTECTED]> wrote: > > Hi, I am new in this django, but I have already tried a few examples > I found on the web, but I have some doubts and queries: > > Given the following classes: > > Book class (models.Model): > Models.ForeignKey author = (Author) > Models.ForeignKey publisher = (Editor) > Publicaction = models.DateTimeField = () > Pages = models.IntegerField pages = () > > Author class (models.Model): > Name = models.CharField (...) > Nationality = models.CharField (...) > > Editor class (models.Model): > Name = models.CharField (...) > Country = models.CharField (...) > > > As could perform the following query: > > All books were published between 2005-2007, whose author > Be "Juan Perez" and belongs to a publisher whose country is "Spain" > > > > Atte > > > Vladi > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---