예제 #1
0
 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"
예제 #2
0
파일: couchdb.py 프로젝트: Sliim/faraday
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")
예제 #3
0
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"
        )
예제 #4
0
 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"
예제 #5
0
 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"