citylive/django-states2 — pull request #42 by alexhayes (2013-07-02 22:40:03+00:00)
Title: Access to transition_log from StateTransition

I wanted a way to update the ```serialized_kwargs``` from within my ```StateTransition.handler``` method, like as follows:

```python
def handler(self, instance, user, accepted=None, **kwargs):
instance.accepted = datetime.now() if accepted is None else accepted
kwargs.update({'accepted': instance.accepted})
self.transition_log.serialized_kwargs = json.dumps(kwargs, cls=DjangoJSONEncoder)
```

The above code ensures that ```accepted``` is serialized even if it wasn't supplied in the ```make_transition``` call.

The patch I've submitted allows for access to the ```transition_log``` in the ```StateTransition``` instance. Obviously It's a very simple approach to solving the problem...

Note that my commit message should read:
> Transition log is *now* available