You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
I'm trying to pass a objects.filter dictionary to HttpResponse. The problem is I have 2 models: InfoBox and InfoDetail. InfoDetail is linked to InfoBox by models.ForeignKey(InfoBox). What I want to do is filter by title which lives in the InfoBox model. I performed infobox = InfoDetail.objects.filter(title=info_title), but it returns an error cus 'title' doesn't live in InfoDetail.
How can i grab and filter it by title and pass {'infobox': infobox} in HttpResponse when HttpRequest is called?
That would return all InfoDetail objects whose related InfoBox has a specific title.
If that doesn't help solve your problem, let me know what else you're stuck on :)
easypie
unread,
Jun 26, 2012, 5:16:04 PM6/26/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
That worked like a charm! I read about the double underscore but didn't think much about it when it crossed my mind. I've been grinding on this for the whole day. My eyes... =)