;ς ‘ΎήBc@sδdZdklZdklZdklZdklZdklZdkl Z dkl Z de i fd „ƒYZ d e i fd „ƒYZ d e i fd „ƒYZeidƒZeideieƒƒƒieƒdS(s4 Simple example of how child resources are located. (sinternet(sservice(sutil(s appserver(sloaders(srend(surls ChildPagecBsGtZeieiedƒƒZd„Zd„Z d„Z d„Z RS(Nschildrenhtml_ChildPage.htmlcCstii|ƒ||_dS(N(srendsPages__init__sselfsname(sselfsname((sS/mnt/gmirror/ports/www/py-nevow/work/Nevow-0.9.18/examples/children/childrenhtml.pys__init__scCsdGHt|iƒSdS(Ns istanzaaa(sChildOfChildPagesselfsname(sselfscontext((sS/mnt/gmirror/ports/www/py-nevow/work/Nevow-0.9.18/examples/children/childrenhtml.pyschild_childOfChildscCs|i|iSdS(N(scontextstagsselfsname(sselfscontextsdata((sS/mnt/gmirror/ports/www/py-nevow/work/Nevow-0.9.18/examples/children/childrenhtml.pys render_namescCs'|idtiidƒƒ|iSdS(Ns childLinks childOfChild(scontexts fillSlotssurlshereschildstag(sselfscontextsdata((sS/mnt/gmirror/ports/www/py-nevow/work/Nevow-0.9.18/examples/children/childrenhtml.pys render_links( s__name__s __module__sloaderssxmlfilesutilssibpaths__file__s docFactorys__init__schild_childOfChilds render_names render_link(((sS/mnt/gmirror/ports/www/py-nevow/work/Nevow-0.9.18/examples/children/childrenhtml.pys ChildPages    sChildOfChildPagecBs5tZeieiedƒƒZd„Zd„Z RS(Ns"childrenhtml_ChildOfChildPage.htmlcCstii|ƒ||_dS(N(srendsPages__init__sselfs parentName(sselfs parentName((sS/mnt/gmirror/ports/www/py-nevow/work/Nevow-0.9.18/examples/children/childrenhtml.pys__init__(scCs|i|iSdS(N(scontextstagsselfs parentName(sselfscontextsdata((sS/mnt/gmirror/ports/www/py-nevow/work/Nevow-0.9.18/examples/children/childrenhtml.pysrender_parentName,s( s__name__s __module__sloaderssxmlfilesutilssibpaths__file__s docFactorys__init__srender_parentName(((sS/mnt/gmirror/ports/www/py-nevow/work/Nevow-0.9.18/examples/children/childrenhtml.pysChildOfChildPage$s sRootPagecBsPtZeZeieiedƒƒZ e dƒZ d„Z d„Z d„ZRS(Nschildrenhtml_RootPage.htmlsfoocCstdƒSdS(sJA resource that is always called 'bar' but is created per-request sbarN(s ChildPage(sselfscontext((sS/mnt/gmirror/ports/www/py-nevow/work/Nevow-0.9.18/examples/children/childrenhtml.pys child_bar9scCs(|dddgjot|ƒSndS(sECreate and return a child resource where the name is dynamic s1s2s3N(snames ChildPage(sselfsctxsname((sS/mnt/gmirror/ports/www/py-nevow/work/Nevow-0.9.18/examples/children/childrenhtml.pys childFactory>scCsPtii|||ƒ\}}|o||fSntdi |ƒƒgfSdS(sΖCreate and return a dynamically named child resource if child_ or childFactory didn't help. However, this time we get the chance to consume multiple path segments (inluding the childOfChild link). Note: locateChild is actually the main resource location API (see inevow.IReource) and it is actually rend.Page's implementation of the method that provides the child_ and childFactory functionality. s/N( srendsPages locateChildsselfsctxssegmentsschildsremainingSegmentss ChildPagesjoin(sselfsctxssegmentsschildsremainingSegments((sS/mnt/gmirror/ports/www/py-nevow/work/Nevow-0.9.18/examples/children/childrenhtml.pys locateChildDs (s__name__s __module__sTruesaddSlashsloaderssxmlfilesutilssibpaths__file__s docFactorys ChildPages child_foos child_bars childFactorys locateChild(((sS/mnt/gmirror/ports/www/py-nevow/work/Nevow-0.9.18/examples/children/childrenhtml.pysRootPage0s    schildreniN(s__doc__stwisted.applicationsinternetsservicestwisted.pythonsutilsnevows appserversloaderssrendsurlsPages ChildPagesChildOfChildPagesRootPages Applications applications TCPServers NevowSitessetServiceParent( srendsservices applicationsurlsloaderssutils appserversChildOfChildPages ChildPagesinternetsRootPage((sS/mnt/gmirror/ports/www/py-nevow/work/Nevow-0.9.18/examples/children/childrenhtml.pys?s        '