Error : Could not build url for endpoint 'my_lynk_page' with values ['fk_page_id']
Below is the redirect where I get the error
@app.route("/pages/add", methods=["POST"])
def proc_pages_add():
params = request.form.to_dict()
response = pages_proc.pages_proc(app)._add_page( params )
redirect_to = response["message_data"]["redirect_to"]
fk_page_id = response["message_data"]["fk_page_id" ]
return redirect( url_for(redirect_to, fk_page_id = fk_page_id ))
Below is where it should return to
@app.route('/admin/my-lynks/<fk_page_id>', defaults={'fk_page_id': 'home'})
def my_lynk_page(fk_page_id):
params = request.args.to_dict()
params["fk_user_id"] = session.get("fk_user_id" )
params["fk_page_id"] = fk_page_id
session["fk_page_id"] = fk_page_id
html = view_my_lynks.view_my_lynks(app).html( params )
html_resp = make_response( html )
html_resp.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
return html_resp
# end def
Is there naming standards I'm not aware?