def __init__(self, app=None): if app is None: from web.config import DefaultConfig self.db_config = DefaultConfig().DBS else: self.app = app self.db_config = self.app.config.get('DBS') self.db_setting = 'default' self._table_name = 'filters' Model.__init__(self)
def __init__(self, db_config, table_name): self.db_config = db_config self.db_setting = 'default' self._table_name = table_name Model.__init__(self)
def __init__(self, app): self.app = app self.db_config = self.app.config.get('DBS') self.db_setting = 'default' self._table_name = 'users' Model.__init__(self)