I have a requirement, which is, show a model's OneToMany related
model's fields in a page, the problem is, if I pass the main model to
simple_tag, then using filter or get or whatever methods to lookup the
specific related model, it will generate db query everytime. When I
have 5 simple_tag which show fields for that related model, it query
db 5 times. I can lookup this related model in view level, and pass it
to template, but the code wasn't very nice. If I have 3~4 related
models, means I must pass 3~4 more variables to template level. Is
there a better design?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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