'Removes and unindex a template from the `templates` container.
:param tpl: The template to remove'

def remove_template(self, tpl):

    try:
        del self.templates[tpl.id]
    except KeyError:
        pass
    self.unindex_template(tpl)
