I'm trying to make a request to the following view. However, I get the error TypeError: echoplaca() got an unexpected keyword argument 'placa'
.
@app.route(r'/enviaplaca/<placa>')
def echoplaca():
return "Numero de placa: {}".format(placa)
You defined the route to be /enviaplaca/<placa>
, but you defined the view function without the placa
argument. The URL captures need to match the function arguments.
@app.route('/echoplaca/<placa>')
def echoplaca(placa):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With