'doc_id -- If you want to be nice, pass the ID of the Document you are
rendering. This will make recursive inclusions fail immediately
rather than after the first round of recursion.'

def __init__(self, base_url=None, doc_id=None):

    super(WikiParser, self).__init__(base_url)
    self.inclusions = ([doc_id] if doc_id else [])
    self.registerInternalLinkHook('Include', self._hook_include)
    self.registerInternalLinkHook('I', self._hook_include)
    self.registerInternalLinkHook('Template', self._hook_template)
    self.registerInternalLinkHook('T', self._hook_template)
