Пример #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
 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)