Advertisement
Guest User

Flask sqlalchemy

a guest
Apr 24th, 2014
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. # the way I add the new data to mysql
  2. box = Safebox(details)
  3. db.session.add(box)
  4. db.session.commit()
  5.  
  6. # the way I fetch the new data
  7. transaction = Safebox.query.filter_by(id= 5SMWZ).first()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement