本文整理匯總了Python中exe.webui.renderable.RenderableResource.getChild方法的典型用法代碼示例。如果您正苦於以下問題:Python RenderableResource.getChild方法的具體用法?Python RenderableResource.getChild怎麽用?Python RenderableResource.getChild使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類exe.webui.renderable.RenderableResource
的用法示例。
在下文中一共展示了RenderableResource.getChild方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: getChild
# 需要導入模塊: from exe.webui.renderable import RenderableResource [as 別名]
# 或者: from exe.webui.renderable.RenderableResource import getChild [as 別名]
def getChild(self, name, request):
"""
Get the child page for the name given.
This is called if our ancestors can't find our child.
This is probably because the url is in unicode
"""
if name == '':
return self
else:
result = self.children.get(unicode(name, 'utf8'))
if result is not None:
return result
else:
session = request.getSession()
if self.packagePath:
session.packageStore.addPackage(self.package)
self.bindNewPackage(self.package, session)
self.packagePath = None
if session.uid in self.mainpages.keys():
if name in self.mainpages[session.uid].keys():
return self.mainpages[session.uid][name]
# This will just raise an error
return RenderableResource.getChild(self, name, request)