def add_currency(): if request.method == "POST": c = Currency() symbol = request.get_json()['symbol'].upper() response_message, response_status = c.create({'symbol': symbol}) if response_status == 201: return jsonify({"message": response_message}), response_status else: return jsonify({"error": response_message}), response_status
def populate_db(): print("Trying to populate Database") c = Currency() c.create({"symbol": "BRL"}) c.create({"symbol": "BTC"}) c.create({"symbol": "USD"}) c.create({"symbol": "ETH"}) c.create({"symbol": "EUR"})