Пример #1
0
    def __init__(self, *args, **kw):
        _Request.__init__(self, *args, **kw)

        self.features = self.DEFAULT_FEATURES.copy()

        # FIXME: Is there a cleaner place to put this?
        self.add_finished_callback(_teardown_session)
Пример #2
0
    def __init__(self, *args, **kw):
        _Request.__init__(self, *args, **kw)

        self.features = self.DEFAULT_FEATURES.copy()
        self.messages = {}

        # FIXME: Is there a cleaner place to put this?
        from briefmetrics.model.meta import Session
        self.db = Session
        self.add_finished_callback(_teardown_session)
Пример #3
0
    def __init__(self,
                 environ,
                 charset=None,
                 unicode_errors=None,
                 decode_param_names=None,
                 **kw):
        Request.__init__(self, environ, charset, unicode_errors,
                         decode_param_names, **kw)
        TracimContext.__init__(self)

        # INFO - G.M - 18-05-2018 - Close db at the end of the request
        self.add_finished_callback(self._cleanup)
Пример #4
0
    def __init__(
            self,
            environ,
            charset=None,
            unicode_errors=None,
            decode_param_names=None,
            **kw
    ):
        Request.__init__(
            self,
            environ,
            charset,
            unicode_errors,
            decode_param_names,
            **kw
        )
        TracimContext.__init__(self)

        # INFO - G.M - 18-05-2018 - Close db at the end of the request
        self.add_finished_callback(self._cleanup)
Пример #5
0
 def __init__(self, environ):
     if hasattr(Request, '__init__'):
         Request.__init__(self, environ)
     #pass
     self.sess = Session(self)
Пример #6
0
 def __init__(self, environ):
   if hasattr(Request, '__init__'):
     Request.__init__(self, environ)
   #pass
   self.sess = Session(self)