equal
deleted
inserted
replaced
73 images = imgs, |
73 images = imgs, |
74 ) |
74 ) |
75 |
75 |
76 elif act == "tag" : |
76 elif act == "tag" : |
77 img_list = req.get_int_list("img") |
77 img_list = req.get_int_list("img") |
78 tag = req.get_str("tag") |
78 tag_list = req.get_str_list("tag") |
79 |
79 |
80 db.insert_many("""INSERT INTO tags (image, tag) VALUES (?, ?)""", ((img, tag) for img in img_list)) |
80 db.insert_many("""INSERT INTO tags (image, tag) VALUES (?, ?)""", ((img, tag) for img in img_list for tag in tag_list)) |
81 |
81 |
82 print "OK" |
82 print "OK" |
83 |
83 |
84 elif act == "untag" : |
84 elif act == "untag" : |
85 img = req.get_int("img") |
85 img = req.get_int("img") |