[clug] dynamic inserts with django templates?

Brendan Jurd direvus at gmail.com
Wed Dec 15 01:38:40 MST 2010

On 15 December 2010 13:09, jm <jeffm at ghostgun.com> wrote:
> If the main content is generated by the controller and the decoration
> (header, footer, navbar, and menu) are common to most pages so you place
> them in an inherited template. How do you generate the variables to be used
> by the decoration? You don't what to repeat yourself by adding it to all the
> actions in each controller.

I write my pages as classes that all inherit from an abstract Page
class.  The common context settings for the common nav elements are
done there.  The templates are a mix of inheritance and includes.



More information about the linux mailing list