Django's template inheritance may be just what you want in terms of not repeating the includes and other boilerplate. If by "pass data" you mean in the rendering context, e.g. there is some data you always want to put there, simplest is to make all your rendering contexts with a factory function that fills in the common parts of the data.
Edit: for the factory function I have in mind nothing especially fancy, just e.g. a simple class:
class ContextFactory(object):
def __init__(self, **pervasive):
self.pervasive = pervasive
def makeContext(self, current):
return dict(self.pervasive, **current)
def registerPervasive(self, name, value):
self.pervasive[name] = value
(etc, if you need more functionality there) then instantiate a single instance contextFactory in some appropriate module of yours. Where your views might currently be rendering with context dicts such as {'foo': bar}
, you will instead use contextFactory.makeContext({'foo': bar})
to give the context factory a chance to inject whatever name/value pairs are currently registered with it -- that's all, really.