def _get_current_database(self): "Returns the database that should be used for the current request" if 'request' in box and not 'CURRENT_DATABASE_NAME' in box: current_db = box['request'].get_host().split('.')[0] else: current_db = box.get('CURRENT_DATABASE_NAME', 'default') return current_db
def _get_current_database(self): "Returns the database that should be used for the current request" if "request" in box and not "CURRENT_DATABASE_NAME" in box: current_db = box["request"].get_host().split(".")[0] else: current_db = box.get("CURRENT_DATABASE_NAME", "default") return current_db