Included code sample in docs for iff

This commit is contained in:
timmartin19
2014-10-20 11:47:03 -04:00
parent d6eb32fccc
commit 1fc6c6422f

View File

@@ -215,6 +215,13 @@ Model Methods
If the insertion isn't applied, a LWTException is raised
.. code-block::
t = TestTransactionModel(text='some text', count=5)
try:
t.iff(count=5).update('other text')
except LWTException as e:
# handle failure
.. method:: update(**values)
Performs an update on the model instance. You can pass in values to set on the model