How do I pass variables to all templates in django?

Viewed 9049

I am trying to pass variables (browser variable) to all my templates in my app. Any advice on how to get it to work?

View:

def browser(request):
    primary_cat_list = Categories.objects.order_by("category")
    subcat_list = SubCategories.objects.order_by("sub_category")
    product = Productbackup.objects.order_by("website")
    browser =  list(chain(primary_cat_list, subcat_list, product))
    return render_to_response('reserve/templates/base.html', locals(), context_instance=RequestContext(request))

Template:

{% for prod in browser %} {{ prod }}, {% endfor %}
3 Answers
Related