How to set database values to elements in a for loop?

Solution
BUY
{% for i in number %} {% endfor %}
BUY
{% for i in number %}
{% endfor %}
@raffle.route('/path/with', methods=['GET', 'POST'])
@login_required
def my_route(data):
    
    # do stuff with data variable
    return render_template('another_template.html')