jacobh / drf-fsm-transitions

Automatically hook your Django-FSM transitions up to Django REST Framework
MIT License
28 stars 14 forks source link

Pass the request to the transition_method #2

Closed ydaniv closed 9 years ago

jacobh commented 9 years ago

I'm not sure on this change, I don't think transition methods should be concerned with requests. I personally would overwrite the specific methods on the viewset which care about the request.

ydaniv commented 9 years ago

Hmmm... perhaps you're right. The intention was to allow more complex logic in the transition method based on input, but I guess it would be cleaner to override the viewset method with that custom logic and pass arguments from the request to the transition method as kwargs.

ydaniv commented 9 years ago

@hzy ok overriding the viewset method is nice, but then I'd like to be able to pass kwargs to the super method and have those passed to the transition method, instead of copy-pasting the entire method. Shall I send an new PR?

jacobh commented 9 years ago

@ydaniv I'm not sure exactly what you mean, if it isn't too difficult sending through a PR would clarify :)