i'm confused behaviour of model. i've got model built off mysql database, , returns correct count of 89, cannot iterate through reason. controller is:
@app.route('/calendar/<date>') def calendar(date): cur_date = datetime.datetime.today() cur_date = cur_date + datetime.timedelta(days=int(date)) cur_date = str(cur_date).split(' ')[0] x = earnings_calendar.query.filter_by(date=cur_date).all() print type(x) in x: print return render_template('calendar.html', data=x)
but when perform:
{% in data %} {{i['qtr']}} {% endfor %}
in view, 1 item shows. length of x 1, if change count shows 89. how iterate through show 89?
i have not defined representation, need to? thought optional.