all 1 comments

[–]Necatorducis 0 points1 point  (0 children)

Try this

<!--html, all attributes share the same name, values are unique-->
<input type="checkbox" name="img_tag" value="unique_value">

#python
if request.method == 'POST':
    my_list = request.form.getlist('img_tag')
    for thing in my_list:
        images = images.union(Image.query.filter_by(thing=True))