On Jan 31, 8:04 pm, eddie <ed.n...@gmail.com> wrote:
> Hey guys & girls,
>
> I've just started playing with django, and am not sure of the best way
> to do something.
>
> I've got a basic site, where page a displays model a, page b displays
> model b, etc.  Every model has it's own view function and template,
> all extending a base template with a header, footer, etc.  In every
> page's footer, I would like to add a parsed RSS feed (just an ul of
> links).
>
> I don't want to repeat code, so I don't feel like calculating it and
> sending it to every render_to_response that I've got (I'll worry about
> caching later, by the way).  So I wonder if there is a way that I
> could give every template access to this object without adding it to
> my views... though this seems like a kind of "global variable" type
> situation that I'm a little wary of too.
>
> How would you proceed?
>
> Thanks!
> -e

Take a look at implementing a template context processor.
--~--~---------~--~----~------------~-------~--~----~
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