Example #1
0
def get_couch_box_db(box_name):
    app_state = current_app.config.geobox_state
    if box_name == 'download':
        couch_box_name = app_state.config.get('couchdb', 'download_box')
    elif box_name == 'upload':
        couch_box_name = app_state.config.get('couchdb', 'upload_box')
    elif box_name == 'file':
        couch_box_name = app_state.config.get('couchdb', 'file_box')
    else:
        raise NotFound()
    gbi_server = GBIServer.current_home_server(g.db)
    if gbi_server is None:
        return couch_box_name
    return '%s_%s' % (gbi_server.prefix, couch_box_name)
Example #2
0
 def home_server(self):
     session = self.user_db_session()
     return GBIServer.current_home_server(session)
Example #3
0
 def home_server(self):
     session = self.user_db_session()
     return GBIServer.current_home_server(session)