From 4f59c7f77fdda587386ec3a03b4de9caf1b0dadf Mon Sep 17 00:00:00 2001 From: Emmanuel Leblond Date: Tue, 25 Jul 2017 16:26:07 +0200 Subject: [PATCH] Expose to user mongoengine.base.NON_FIELD_ERRORS This variable is used to set the field containing the errors raised in a clean function. Given those function are user-defined, users should be able to get the name of the field to easily retreive their custom errors. --- mongoengine/base/document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongoengine/base/document.py b/mongoengine/base/document.py index 99c8af87..d05c7695 100644 --- a/mongoengine/base/document.py +++ b/mongoengine/base/document.py @@ -19,7 +19,7 @@ from mongoengine.common import _import_class from mongoengine.errors import (FieldDoesNotExist, InvalidDocumentError, LookUpError, OperationError, ValidationError) -__all__ = ('BaseDocument',) +__all__ = ('BaseDocument', 'NON_FIELD_ERRORS') NON_FIELD_ERRORS = '__all__'