Hi

These are my two (related) models:

class Attachment(models.Model):
   post = models.ForeignKey('Post')
   name= models.CharField(max_length=255)

class Post(models.Model):
   text = models.TextField()

I want to select all Posts where text contains "Some Text" or
Attachment.name (which is related to one post) contains "Some Text".
Is there a way to do this with Django's ORM?

Thank you very much.

Peter

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to