Example #1
0
    def awake(self, transaction):
        """Let servlet awake.

        Makes instance variables from the transaction. This is where Page
        becomes unthreadsafe, as the page is tied to the transaction.
        This is also what allows us to implement functions like `write`,
        where you don't need to pass in the transaction or response.
        """
        HTTPServlet.awake(self, transaction)
        self._response = transaction.response()
        self._request = transaction.request()
        self._session = None  # don't create unless needed
Example #2
0
    def awake(self, transaction):
        """Let servlet awake.

        Makes instance variables from the transaction. This is
        where Page becomes unthreadsafe, as the page is tied to
        the transaction. This is also what allows us to
        implement functions like `write`, where you don't
        need to pass in the transaction or response.
        """
        HTTPServlet.awake(self, transaction)
        self._response = transaction.response()
        self._request = transaction.request()
        self._session = None  # don't create unless needed
        assert self._transaction is not None
        assert self._response is not None
        assert self._request is not None
Example #3
0
 def awake(self, transaction):
     """Begin transaction."""
     HTTPServlet.awake(self, transaction)
     self._transaction = transaction
Example #4
0
 def awake(self, transaction):
     """Begin transaction."""
     HTTPServlet.awake(self, transaction)
     self._transaction = transaction
Example #5
0
	def awake(self, transaction):
		HTTPServlet.awake(self, transaction)
		self._transaction = transaction