On Thu, Jun 25, 2009 at 12:23 PM, Pete-Sitedesign < peter.king.sitedes...@googlemail.com> wrote:
> > I want to build a site which has latest news on the side of all the > pages, I wanted to build the pages using simple templates (static > content) and then reference them using the direct_to_template in the > urls file. > > Since each template extends base how can I get base to contain the > latest news or do I have to write a view for each template and pass > the news into them? > > Sorry for the newbie question. > > > > There are 2 ways to do this, either a) a template context process, which bsaically adds something to the context of all templates rendered, or b) an inclusion tag which basically let's you do an include but with a new context that you can create dynamically. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---