def render(self, req):
        autotimer = self.getAutoTimerInstance()

        # show xml
        req.setResponseCode(http.OK)
        req.setHeader('Content-type', 'application; xhtml+xml')
        req.setHeader('charset', 'UTF-8')
        return ''.join(autotimer.getXml())
Пример #2
0
	def render(self, req):
		autotimer = self.getAutoTimerInstance()

		# show xml
		req.setResponseCode(http.OK)
		req.setHeader('Content-type', 'application; xhtml+xml')
		req.setHeader('charset', 'UTF-8')
		return ''.join(autotimer.getXml())
	def render(self, req):
		# We re-read the config so we won't display empty or wrong information
		try:
			autotimer.readXml()
		except Exception:
			return self.returnResult(req, False, _("Couldn't load config file!"))
		# show xml
		req.setResponseCode(http.OK)
		req.setHeader('Content-type', 'application/xhtml+xml')
		req.setHeader('charset', 'UTF-8')
		return ''.join(autotimer.getXml())
    def render(self, req):
        # We re-read the config so we won't display empty or wrong information
        try:
            autotimer.readXml()
        except Exception as e:
            return self.returnResult(req, False, _("Couldn't load config file!") + "\n" + str(e))

            # show xml
        req.setResponseCode(http.OK)
        req.setHeader("Content-type", "application/xhtml+xml")
        req.setHeader("charset", "UTF-8")
        return "".join(autotimer.getXml())
	def render(self, req):
		# We re-read the config so we won't display empty or wrong information
		try:
			autotimer.readXml()
		except Exception as e:
			return self.returnResult(req, False, _("Couldn't load config file!") + '\n' + str(e))

		# show xml
		req.setResponseCode(http.OK)
		req.setHeader('Content-type', 'application/xhtml+xml')
		req.setHeader('charset', 'UTF-8')
		return ''.join(autotimer.getXml())
Пример #6
0
	def render(self, req):
		# We re-read the config so we won't display empty or wrong information
		try:
			autotimer.readXml()
		except Exception as e:
			return self.returnResult(req, False, _("Couldn't load config file!") + '\n' + str(e))
		webif = True
		p = req.args.get('webif')
		if p:
			webif = not(p[0] == "false")
		# show xml
		req.setResponseCode(http.OK)
		req.setHeader('Content-type', 'application/xhtml+xml')
		req.setHeader('charset', 'UTF-8')
		return ''.join(autotimer.getXml(webif))