skip to Main Content

How can I solve a "500 Internal Server Error" when importing modules in __init__.py? – Html

I use Flask for the first time. The following __init__.py is working fine : Python v3.10.6 #!/usr/bin/env python3 from flask import Flask, render_template, request app = Flask(__name__) @app.route('/testurl') def testurl(): return render_template('index.html') @app.route('/from_client', methods=['POST']) def from_client(): request_data = request.get_json() return…

VIEW QUESTION

How to get gif from get response – Javascript

Here i have my flask function that returns the image: @app.route("/getResults", methods=['GET']) def get_results(): print(request) job_key = request.args["id"] filename = '/home/pat/projets/giftmaker/webapp/public/workingDir/1/test.png' return send_file(filename, mimetype='image/png') then I have my attemp to read it: export function Download ({jobID}) { const [img, setImg]…

VIEW QUESTION

How to pass default input value using for loop in a form using Jinja? – Html

<tbody> {% for template in rs_templates %} <tr> <th scope="row">{{template.id}}</th> <td>{{ template.compound }}</td> <td>{{template.strength}}</td> <!--update template code--> <td> <button type="button" class="btn btn-warning" data-toggle="modal" data-target="#updateModal">Update</button> </td> <!-- Update Template Modal --> <div class="modal fade" id="updateModal" tabindex="-1" aria-labelledby="updateModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div…

VIEW QUESTION
Back To Top
Search