Skip to content

Commit

Permalink
Improve code rendering in README.rst.
Browse files Browse the repository at this point in the history
  • Loading branch information
rbarrois committed Feb 5, 2017
1 parent 6b04b50 commit 4a94b04
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ Links
Example
-------

It allows to easilly define a workflow, attach it to a class, and use its transitions::
It allows to easilly define a workflow, attach it to a class, and use its transitions:

.. code-block:: python
import xworkflows
Expand Down Expand Up @@ -66,6 +68,8 @@ It allows to easilly define a workflow, attach it to a class, and use its transi
def blah(self):
return 13
.. code-block:: python
>>> o = MyObject()
>>> o.state
<StateWrapper: <State: 'foo'>>
Expand Down Expand Up @@ -96,8 +100,10 @@ Hooks
-----

Custom functions can be hooked to transactions, in order to run before/after a transition,
when entering a state, when leaving a state, ...::
when entering a state, when leaving a state, ...:


.. code-block:: python
class MyObject(xworkflows.WorkflowEnabled):
Expand Down

0 comments on commit 4a94b04

Please sign in to comment.