'Binds the app context to the current context.'

def push(self):

    self._refcnt += 1
    if hasattr(sys, 'exc_clear'):
        sys.exc_clear()
    _app_ctx_stack.push(self)
    appcontext_pushed.send(self.app)
