'Like :meth:`Flask.context_processor` but for a blueprint.  This
function is only executed for requests handled by a blueprint.'

def context_processor(self, f):

    self.record_once((lambda s: s.app.template_context_processors.setdefault(self.name, []).append(f)))
    return f
