skip to Main Content

Can Flask return a JSON array of objects?

I am working on a simple CRUD application and I can't return an array of objects in Flask. My db Model is like this: class QrRecord(db.Model): id = db.Column(db.String(256), primary_key=True) name = db.Column(db.String(128), nullable=False) date = db.Column(db.Date, nullable=False) qrType =…

VIEW QUESTION

Can HTML parameters be used in Javascript?

I am a starting with flask/html/javascript and I have this issue: I render a template from python: return render_template("loading.html", process='abc') This es the content of loading.html file <body> <div class="titulo"> <p>here I see the value of parameter sent {{process}}</p> </div>…

VIEW QUESTION

how to access dictionary inside list javascript – Html

I want to extract the longitude and latitude coordinates of each restaurant: <div id="map" style="height: 400px;"></div> <script> var map = L.map('map').setView([37.7749, -122.4194], 12); L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: '&copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors', maxZoom: 18, }).addTo(map); let temp = '{{ output_info }}'; console.log(temp);…

VIEW QUESTION
Back To Top
Search