@auth
    def _GET(self, *param, **params):
        host_id = self.chk_hostby1(param)
        if host_id is None: return web.notfound()

        target = param[1]
        if target is None: return web.notfound()

        lang = param[2]
        if lang is None: return web.notfound()

        if not validates_watch(self, target, lang):
            self.logger.debug("Get watch mail template failed. Did not validate.")
            return web.badrequest(self.view.alert)

        template_dir = "%s/%s" % (TEMPLATE_DIR,lang[0:2],)

        mail_template_warning = read_file("%s/%s" % (template_dir,MAIL_TEMPLATE_COLLECTD_WARNING[target]))
        mail_template_failure = read_file("%s/%s" % (template_dir,MAIL_TEMPLATE_COLLECTD_FAILURE[target]))
        mail_template_okay = read_file("%s/%s" % (template_dir,MAIL_TEMPLATE_COLLECTD_OKAY[target]))

        data = {
            "mail_template_warning" : mail_template_warning,
            "mail_template_failure" : mail_template_failure,
            "mail_template_okay" : mail_template_okay,
            }

        self.view.data = json_dumps(data)
        return True
dataset/ETHPy150Open karesansui/karesansui/karesansui/gadget/hostby1watchtemplate.py/HostBy1WatchTemplate._GET/original