SHARE
TWEET

Untitled

a guest Jul 17th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. new_log = Log()
  2. db.session.add(new_log)
  3. ...
  4. if some logic:
  5.    db.session.rollback()
  6. else:
  7.    db.session.commit()
  8.      
  9. db = SQLAlchemy(app)
  10. logger_db = SQLAlchemy(app)
  11.      
  12. new_log = Log()
  13. logger_db.session.add(new_log)
  14. logger_db.session.commit()
  15. ...
  16. if some logic:
  17.    db.session.rollback()
  18. else:
  19.    db.session.commit()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top