views.py
def listPointClusterOnDate():
    """This function asks the db for clusters' points list of specific date"""
    if request.is_xhr and request.method=="POST":
        dateold = request.form['dateStr']
        datenew = datetime(int(dateold[0:4]), int(dateold[4:6]), int(dateold[6:8]), int(dateold[9:11]))
        #print("Individuare i Point Cluster con datetime", str(datenew))
        try:
            result, cursorListPointCluster = managedb.listPointClusterOnDateDB(datenew)
            if (result == False):
                print("point: there aren't results")
                return json.dumps({"result": "empty"})
            else:
                print("point: there are results")
                cursorListPointClusterJSON = mytools.modifyPointClusterJSON(cursorListPointCluster)
                return cursorListPointClusterJSON
        except Exception as e:
            print("exception error DB", str(e))
            return json.dumps({"result": "error"})
This function asks the db for clusters' points list of specific date
This function asks the db for clusters' points list of specific date
This function asks the db for clusters ' points list of specific date
def listPointClusterOnDate():
    if request.is_xhr and request.method=="POST":
        dateold = request.form['dateStr']
        datenew = datetime(int(dateold[0:4]), int(dateold[4:6]), int(dateold[6:8]), int(dateold[9:11]))
        try:
            result, cursorListPointCluster = managedb.listPointClusterOnDateDB(datenew)
            if (result == False):
                print("point: there aren't results")
                return json.dumps({"result": "empty"})
            else:
                print("point: there are results")
                cursorListPointClusterJSON = mytools.modifyPointClusterJSON(cursorListPointCluster)
                return cursorListPointClusterJSON
        except Exception as e:
            print("exception error DB", str(e))
            return json.dumps({"result": "error"})
def listPointClusterOnDate ( ) : if request . is_xhr and request . method == "POST" : dateold = request . form [ 'dateStr' ] datenew = datetime ( int ( dateold [ 0 : 4 ] ) , int ( dateold [ 4 : 6 ] ) , int ( dateold [ 6 : 8 ] ) , int ( dateold [ 9 : 11 ] ) ) try : result , cursorListPointCluster = managedb . listPointClusterOnDateDB ( datenew ) if ( result == False ) : print ( "point: there aren't results" ) return json . dumps ( { "result" : "empty" } ) else : print ( "point: there are results" ) cursorListPointClusterJSON = mytools . modifyPointClusterJSON ( cursorListPointCluster ) return cursorListPointClusterJSON except Exception as e : print ( "exception error DB" , str ( e ) ) return json . dumps ( { "result" : "error" } )
This function asks the db for clusters' points list of specific date
This function asks the db for clusters ' points list of specific date
"""This function asks the db for clusters' points list of specific date""" #print("Individuare i Point Cluster con datetime", str(datenew))