How to avoid passing of the same parameters in many views
Hi,
I have a block, included into several pages (for example, in all
sections of my website you can see top rated articles in the right
column). I can include a template, that prints this list into base
template and avoid any copy-paste here.
But I need to provide it with context variable, that contains a list
of top rated articles, so I need to remember to include
{'top_articles': top_articles} into all render_to_response calls.
Is it possible to avoid this duplication somehow? Thanks.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home