コード例 #1
0
 def reallyRender(self, request):
     res = resource.getChildForRequest(self.res, request)
     val = res.render(request)
     if val != NOT_DONE_YET:
         request.write(val)
         request.finish()
     return widgets.FORGET_IT
コード例 #2
0
 def reallyRender(self, request):
     # it's authenticated already...
     res = resource.getChildForRequest(self.res, request)
     val = res.render(request)
     if val != NOT_DONE_YET:
         request.write(val)
         request.finish()
     return widgets.FORGET_IT
コード例 #3
0
ファイル: util.py プロジェクト: swift1911/twisted
 def _cbChild(self, child, request):
     result = resource.getChildForRequest(child, request).render(request)
     from twisted.web.server import NOT_DONE_YET
     if result == NOT_DONE_YET:
         return
     else:
         request.write(result)
         request.finish()
コード例 #4
0
 def _cbChild(self, child, request):
     result = resource.getChildForRequest(child, request).render(request)
     from twisted.web.server import NOT_DONE_YET
     if result == NOT_DONE_YET:
         return
     else:
         request.write(result)
         request.finish()
コード例 #5
0
 def getResourceFor(self, request):
     """Get a resource for a request.
     This iterates through the resource heirarchy, calling
     getChildWithDefault on each resource it finds for a path element,
     stopping when it hits an element where isLeaf is true.
     """
     request.site = self
     request.sitepath = copy.copy(request.prepath)
     return resource.getChildForRequest(self.resource, request)
コード例 #6
0
    def getResourceFor(self, request):
        """Get a resource for a request.

        This iterates through the resource heirarchy, calling
        getChildWithDefault on each resource it finds for a path element,
        stopping when it hits an element where isLeaf is true.
        """
        request.site = self
        # Sitepath is used to determine cookie names between distributed
        # servers and disconnected sites.
        request.sitepath = copy.copy(request.prepath)
        return resource.getChildForRequest(self.resource, request)
コード例 #7
0
    def getResourceFor(self, request):
        """Get a resource for a request.

        This iterates through the resource heirarchy, calling
        getChildWithDefault on each resource it finds for a path element,
        stopping when it hits an element where isLeaf is true.
        """
        request.site = self
        # Sitepath is used to determine cookie names between distributed
        # servers and disconnected sites.
        request.sitepath = copy.copy(request.prepath)
        return resource.getChildForRequest(self.resource, request)