Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to correctly call url_for and specify path parameters

@application.route("/students/<int:id>", methods=["GET", "POST"])
def student_by_id(id):
    return {"student": id}

@application.route("/students")
def all_students():
    return {"students": "all"}
 
PREVIOUS NEXT
Tagged: #How #correctly #call #path #parameters
ADD COMMENT
Topic
Name
1+1 =