I have the following starting code:
@app.route('/venues')
def venues():
# TODO: replace with real venues data.
# num_shows should be aggregated based on number of upcoming shows per venue.
data=[{
"city": "San Francisco",
"state": "CA",
"venues": [{
"id": 1,
"name": "The Musical Hop",
"num_upcoming_shows": 0,
}, {
"id": 3,
"name": "Park Square Live Music & Coffee",
"num_upcoming_shows": 1,
}]
}, {
"city": "New York",
"state": "NY",
"venues": [{
"id": 2,
"name": "The Dueling Pianos Bar",
"num_upcoming_shows": 0,
}]
}]
return render_template('pages/venues.html', areas=data);
how do i take this data and import it into my database? I have columns for the information to go into but cant seem to figure out how to get values inside.