Пример #1
0
class AskbotSkinTemplates(BaseEngine):
    def __init__(self, params):
        junk = params.pop('OPTIONS')  #we don't use this parameter
        super(AskbotSkinTemplates, self).__init__(params)
        self.loader = Loader(self)

    def get_template(self, name):
        return Template(self.loader.load_template(name)[0])

    def from_string(self, template_code):
        skin = get_skin()
        return Template(skin.from_string(template_code))
Пример #2
0
class AskbotSkinTemplates(BaseEngine):

    def __init__(self, params):
        junk = params.pop('OPTIONS') #we don't use this parameter
        super(AskbotSkinTemplates, self).__init__(params)
        self.loader = Loader(self)

    def get_template(self, name):
        return Template(self.loader.load_template(name)[0])

    def from_string(self, template_code):
        skin = get_skin()
        return Template(skin.from_string(template_code))
Пример #3
0
 def __init__(self, params):
     junk = params.pop('OPTIONS')  #we don't use this parameter
     super(AskbotSkinTemplates, self).__init__(params)
     self.loader = Loader(self)
Пример #4
0
 def __init__(self, params):
     junk = params.pop('OPTIONS') #we don't use this parameter
     super(AskbotSkinTemplates, self).__init__(params)
     self.loader = Loader(self)