I understand that this should be done by modifying the request in
your middleware and then making use of it in your templates (if
it's to appear on every page, it may (or may not) make sense to
put it in your base.html template). This assumes your views are
using a RequestContext which pass the request object into the
template as part of the rendering context.
-tim