Example #1
0
 def delete_from_db(self):
     session.delete(self)
     session.commit()
     session.close()
Example #2
0
 def save_to_db(self):
     session.add(self)
     session.commit()
     session.close()