views.py
def modifyLabel():
    """This function allows to change the label of a polygon"""
    if request.is_xhr and request.method=="POST":
        idDB = request.form["id"]
        name = request.form["name"]
        #print("modifica label del Polygon con idDB",idDB)
        #print("nuova etichetta",name)
        try:
            count1 = managedb.getCountLoginDB(session["username"])
            if count1 == 0:
                return json.dumps({"result": "exit"})
            managedb.modifyLabelPolygonOnIdDB(idDB,name)
            return json.dumps({"result": "correct"})
        except Exception as e:
            print("exception error DB",str(e))
            return json.dumps({"result": "error"})
This function allows to change the label of a polygon
This function allows to change the label of a polygon
This function allows to change the label of a polygon
def modifyLabel():
    if request.is_xhr and request.method=="POST":
        idDB = request.form["id"]
        name = request.form["name"]
        try:
            count1 = managedb.getCountLoginDB(session["username"])
            if count1 == 0:
                return json.dumps({"result": "exit"})
            managedb.modifyLabelPolygonOnIdDB(idDB,name)
            return json.dumps({"result": "correct"})
        except Exception as e:
            print("exception error DB",str(e))
            return json.dumps({"result": "error"})
def modifyLabel ( ) : if request . is_xhr and request . method == "POST" : idDB = request . form [ "id" ] name = request . form [ "name" ] try : count1 = managedb . getCountLoginDB ( session [ "username" ] ) if count1 == 0 : return json . dumps ( { "result" : "exit" } ) managedb . modifyLabelPolygonOnIdDB ( idDB , name ) return json . dumps ( { "result" : "correct" } ) except Exception as e : print ( "exception error DB" , str ( e ) ) return json . dumps ( { "result" : "error" } )
This function allows to change the label of a polygon
This function allows to change the label of a polygon
"""This function allows to change the label of a polygon""" #print("modifica label del Polygon con idDB",idDB) #print("nuova etichetta",name)