kmmbvnr/django-fsm — pull request #31 by bacongobbler (2014-04-10 21:20:33+00:00)
Title: add optional crashed state to the decorator

This adds an optional "crashed" state to the decorator.

When the calling function raises an Exception and the crashed
parameter is set in the decorator, the state will change to the
crashed state. If the crashed parameter is not set, then the
state is unchanged and stays at the source state.

This commit is backwards compatible with django-fsm v2.0.1,
so all existing users of django-fsm do not have to rewrite when
this is cut into the next release.

See the tests for an example on how to use this new parameter.