How to pass common dictionary data to every page in django
问题 I have a common data {the logged-in user's message number) to display on every page. I can simply pass to template as dict={'messagenumber':5} return render_to_response('template.html',dict,context_instance=RequestContext(request)) But it looks tedious if i have this dict data pass to very page. Is there an easier way to pass common data to every page? Thanks django django-templates share | improve this question 回答1: It blows me away how common this is. You want to use context processors my