예제 #1
0
파일: jinja.py 프로젝트: aircable/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["version"] = __version__
	return TemplateResource(template, context)
예제 #2
0
파일: jinja.py 프로젝트: 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)
예제 #3
0
파일: jinja.py 프로젝트: manuelnaranjo/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)