How can I handle an object state in the django admin?
All I can do is setting a 'choices' attribute in my field, to display a choice widget. However, it will not use the transitions methods.
How can I be sure to always use those methods?
There is no way to do that. You can only set state field as readonly.
Usually state method have some parameters, so there is no possibility to provide some relable and generic implementation for calling it from admin,
Thank you for your super-fast reply.
The thing is, my model state can be updated from many places: in a view, in my admin, in a management task, etc.
What I need it being able to process some code each time some model goes from state x to state y.
Would it be possible to run the translation method if it's available, rathar than setting the state directly?
It is not the case for django_fsm purpose
Ok, thank you for your replies.