Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1.     test_json = [
  2.     {
  3.         'name' : 'image1',
  4.         'schemeResponce' : "rewfr",
  5.     },
  6.     {
  7.         'name' : 'image2',
  8.         'schemeResponce' : "srfrefw",
  9.     },
  10.     {
  11.         'name' : 'image3',
  12.         'schemeResponce' : "ifbrefivber",
  13.     }
  14. ]
  15.     json_data = request.json
  16.     print(scheme_name, file=sys.stdout)
  17.     print(json_data, file=sys.stdout)
  18.  
  19.     for step in test_json:
  20.         print(step["schemeResponce"])
  21.         db.session.query(Step, Scheme).filter(Step.scheme_id == Scheme.id).\
  22.             filter(Scheme.name == scheme_name, Step.name == step["name"]).update({"schemeResponce": step["schemeResponce"]})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement