views:

34

answers:

1

I have a model Category, and I want its objects to always be displayed in a navigation menu in my base.html template (which all of my other templates extend).

I want to learn best-practices so would like to know what the correct/accepted way of providing this data to the template is.

+1  A: 

You could create a custom tag for the categories and place it in the base template. That way you wont have to send a "category" variable to the context on every view ..

Good Luck

pleasedontbelong
+1 for good solution (I'd also do it this way), but you might want to detail it a bit more.
André Caron
Ah, inclusion tags look like they'll help me out here. Thanks!
kungpoo