for example, i have this models: (like here: http://www.djangoproject.com/documentation/models/many_to_one/) ---------------------------------------------------------------------------------------- from django.db import models
class Reporter(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) email = models.EmailField() def __unicode__(self): return u"%s %s" % (self.first_name, self.last_name) class Article(models.Model): headline = models.CharField(max_length=100) pub_date = models.DateField() reporter = models.ForeignKey(Reporter) def __unicode__(self): return self.headline class Meta: ordering = ('headline',) ---------------------------------------------------------------------------------------- I have some amount of articles and i have to reporters, with first names "John" and "Paul". I want to get all Articles, created by John and Paul (not only by John and only by Paul). Who this could be done and who could this be done with a Q-object (in one query)? --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---