Thread Previous • Date Previous • Date Next • Thread Next |
Hi everybody,I'm not sure this ML is the good place to do framework features request. Tell me if it's not.
I think we could improve _constraints error message. Currently, the message is static. It would be a good idea to let it be dynamic.
For example, I'm working a module which allocate ressources to a project task, and a ressource can't be allocated if an other task already use it at the same time.
In the message, we can't tell the user which task is using the ressource, because it is static.
A workaround could be to catch an exception like ValidationError or ConstraintError (as you want, the name doesn't matter). If such an exception is raised, the str() of the exception object could be used instead of the default message. This feature will stay compatible with the old system and add some flexibility.
I'm pretty sure it's not hard to implement and it could improve user experience in some cases for 6.1 modules. What do you think ?
-- Thibaut DIRLIK
Thread Previous • Date Previous • Date Next • Thread Next |