def pushReports(self): vmanager = ViewsManager() reports = os.path.join(os.getcwd(), "views", "reports") try: workspace = self.__serv.get_or_create_db("reports") vmanager.addView(reports, workspace) except: getLogger(self).warn( "Reports database couldn't be uploaded. You need to be an admin to do it") return self.__uri + "/reports/_design/reports/index.html"
def push_reports(): vmanager = ViewsManager() try: logger.debug(u'Pushing Reports DB into CouchDB') couchdb_server = CouchDBServer() workspace = couchdb_server.get_or_create_db('reports') vmanager.addView(config.REPORTS_VIEWS_DIR, workspace) except: import traceback logger.debug(traceback.format_exc()) logger.warning("Reports database couldn't be uploaded. You need to be an admin to do it")
def push_reports(): vmanager = ViewsManager() try: logger.debug(u'Pushing Reports DB into CouchDB') couchdb_server = CouchDBServer() workspace = couchdb_server.get_or_create_db('reports') vmanager.addView(config.REPORTS_VIEWS_DIR, workspace) except: import traceback logger.debug(traceback.format_exc()) logger.warning( "Reports database couldn't be uploaded. You need to be an admin to do it" )
def pushReports(self): vmanager = ViewsManager() reports = os.path.join(os.getcwd(), "views", "reports") workspace = self.__serv.get_or_create_db("reports") vmanager.addView(reports, workspace) return self.__uri + "/reports/_design/reports/index.html"