def get_app(self, reference_app=None):
"""Helper method that implements the logic to look up an
application."""
if reference_app is not None:
return reference_app
if current_app:
return current_app
if self.app is not None:
return self.app
raise RuntimeError(
'application not registered on db instance and no application'
'bound to current context'
)
评论列表
文章目录