Add support to the ObjectActionMixin to report on instance action failures. Add also an error_message class property and the new ActionError exception.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-08-23 01:46:18 -04:00
parent 48e7b7970c
commit ec44e81864
3 changed files with 22 additions and 3 deletions

View File

@@ -8,6 +8,14 @@ class BaseCommonException(Exception):
pass
class ActionError(BaseCommonException):
"""
Raise by the MultiActionConfirmView to announce when the object action
failed for one or more items. This exception doesn't stop the iteration,
it is used to announce that one item in the queryset failed to process.
"""
class NotLatestVersion(BaseCommonException):
"""
The installed version is not the latest available version