How can I route a URL with empty params?
JFK-LAX for $100 works: /username=Bob/flight_search/org=JFK&dst=LAX&price=100/
JFK-(anywhere) for $100 throws 404 error: /username=Bob/flight_search/org=JFK&dst=&price=100/
The dst=&
without any value seems to cause the problem.
@app.route('/username=<username>/flight_search/org=<org>&dst=<dst>&price=<price>/')
def flights(username, org, dst, price):
flights = Flights.query.filter_by(org=org, dst=dst, price=price)
return render_template('search_results.html', data=flights)