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?
Here's models: http://paste.ubuntu.com/1061144/
Here's views: http://paste.ubuntu.com/1061146/
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/Y4H1cgbG1yAJ.
To post to this group, send email to [email protected].
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.