Created
April 7, 2014 10:50
-
-
Save dstufft/10018194 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| connection = engine.connect() | |
| transaction = connection.begin() | |
| with connection.connect() as conn: | |
| conn.execute( | |
| """ UPDATE accounts_user | |
| SET password = %(password)s | |
| WHERE username = %(username)s | |
| """, | |
| password=new_hash, | |
| username=username, | |
| ) | |
| transaction.rollback() | |
| connection.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment