Esempio n. 1
0
  def getChild(self, path, request):
	if "media" in path or "favicon.ico" in path:
		return Resource.getChild(self, path, request)
	if len(path) == 0:
		path = "redirect.html"
	template = self.env.get_template(path)
	context = self.contexts.get(path, lambda x,y: {})(self, request)
	context["pairing_supported"]=bluetooth.isPairingSupported()
	context["version"] = __version__
	return TemplateResource(template, context)
Esempio n. 2
0
File: jinja.py Progetto: ygl-rg/AIRi
 def getChild(self, path, request):
     if "media" in path or "favicon.ico" in path:
         return Resource.getChild(self, path, request)
     if len(path) == 0:
         path = "redirect.html"
     template = self.env.get_template(path)
     context = self.contexts.get(path, lambda x, y: {})(self, request)
     context["pairing_supported"] = bluetooth.isPairingSupported()
     context["l2cap_supported"] = bluetooth.L2CAP_SUPPORTED
     context["sco_supported"] = bluetooth.SCO_SUPPORTED
     context["version"] = __version__
     try:
         context["android"] = bluetooth.isAndroid()
     except:
         context["android"] = False
     return TemplateResource(template, context)
Esempio n. 3
0
 def getChild(self, path, request):
     if "media" in path or "favicon.ico" in path:
         return Resource.getChild(self, path, request)
     if len(path) == 0:
         path = "redirect.html"
     template = self.env.get_template(path)
     context = self.contexts.get(path, lambda x,y: {})(self, request)
     context["pairing_supported"] = bluetooth.isPairingSupported()
     context["l2cap_supported"] = bluetooth.L2CAP_SUPPORTED
     context["sco_supported"] = bluetooth.SCO_SUPPORTED
     context["version"] = __version__
     try:
         context["android"] = bluetooth.isAndroid()
     except:
         context["android"] = False
     return TemplateResource(template, context)