views:

39

answers:

2

i have a navigation element that is determined by values in a database.

no matter what view it is, i need to get these navigation objects out of the database.

where in the code can i tell it to set a template variable containing all the navigation objeccts without setting it in every view?

+1  A: 

It sounds like a good use for a context processor.

Ned Batchelder
thanks, this was what I was looking for, and in general solved a lot of questions I had about django.
brian
+1  A: 

Right way to do this is to use templatetag. Then you don't have to include it in every view, just in your templates like {% load navigation %} {% navigation %}

How to write one:

sorki