views.py
def listStormOnDate():
    """This function allows to ask the db for polygons' 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("Request Polygon list with datetime: ",str(datenew))
        try:
            result,cursorListPolygon = managedb.listPolygonOnDateDB(datenew)
            if(result == False):
                print("polygon: there aren't results")
                return json.dumps({"result": "empty"})
            else:
                print("polygon: there are results")
                cursorListPolygonJSON= mytools.modifyPolygonJSON(cursorListPolygon)
                return cursorListPolygonJSON
        except Exception as e:
            print("exception error DB",str(e))
            return json.dumps({"result":"error"})
This function allows to ask the db for polygons' list of specific date
This function allows to ask the db for polygons' list of specific date
This function allows to ask the db for polygons ' list of specific date
def listStormOnDate():
    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("Request Polygon list with datetime: ",str(datenew))
        try:
            result,cursorListPolygon = managedb.listPolygonOnDateDB(datenew)
            if(result == False):
                print("polygon: there aren't results")
                return json.dumps({"result": "empty"})
            else:
                print("polygon: there are results")
                cursorListPolygonJSON= mytools.modifyPolygonJSON(cursorListPolygon)
                return cursorListPolygonJSON
        except Exception as e:
            print("exception error DB",str(e))
            return json.dumps({"result":"error"})
def listStormOnDate ( ) : 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 ( "Request Polygon list with datetime: " , str ( datenew ) ) try : result , cursorListPolygon = managedb . listPolygonOnDateDB ( datenew ) if ( result == False ) : print ( "polygon: there aren't results" ) return json . dumps ( { "result" : "empty" } ) else : print ( "polygon: there are results" ) cursorListPolygonJSON = mytools . modifyPolygonJSON ( cursorListPolygon ) return cursorListPolygonJSON except Exception as e : print ( "exception error DB" , str ( e ) ) return json . dumps ( { "result" : "error" } )
This function allows to ask the db for polygons' list of specific date
This function allows to ask the db for polygons ' list of specific date
"""This function allows to ask the db for polygons' list of specific date"""