Category : flask-sqlalchemy

I use this Flask code to manually display SQLAlchemy Data: @portfolioPath.route(‘/portfolio’, methods=[‘GET’,’POST’]) def portfolio(): if request.method == ‘POST’: all_data = HoldingsTable.query.all() return render_template("portfolio.html", all_data_html = all_data) in this dynamic HTML table that shows the queried data here: <!– Equity Holdings Overview Table –> <table class="table table-hover table-striped table-sm"> <tr> <th>ID</th> <th>Trade Date</th> <th>Name</th> <th>Symbol</th> <th>Shares</th> ..

Read more

after pressing the data from the multiselect dropbar using javascript, flask was not redirecting me to web page i asked it to index.html <form method="post" id="multiple_select_form"> <select name="skills" id="skills" class="form-control selectpicker" data-live-search="true" multiple> {% for all in dropdown_list: %} <option value={{all}}>{{all}}</option> {% endfor %} </select> <br /><br /> <input type="hidden" name="hidden_skills" id="hidden_skills" /> <input type="submit" ..

Read more

I’m trying to figure out how to write an api route that handles deleting one entity without deleting the other. For instance, I’m working on an inventory project and I want the ability to delete a product without deleting the raw materials associated with it. These are my tables: product_materials = db.Table ( "product_materials", db.Column( ..

Read more