def load_template(self, file): file = self.trans_template(file) t = loader.get_template(file) if not t: return None ret = Template() ret.template = t return ret