  from django.conf.settings import JING_PATH
  from django.utils.translation import gettext_lazy, ngettext
  
  class ValidationError(Exception):
      def __init__(self, message):
          "ValidationError can be passed a string or a list."
          if isinstance(message, list):
              self.messages = message
 
</s> remove             assert isinstance(message, basestring), ("'%s' should be a string" % message)
 </s> add             assert isinstance(message, (basestring, Promise)), ("'%s' should be a string" % message) </s> remove             assert isinstance(message, basestring), ("%s should be a string" % repr(message))
 </s> add             assert isinstance(message, (basestring, Promise)), ("%s should be a string" % repr(message)) </s> remove     class __proxy__:
 </s> add     class __proxy__(Promise):
from django.utils.functional import Promise
  from django.conf.settings import JING_PATH
  from django.utils.translation import gettext_lazy, ngettext
from django.utils.functional import Promise
  
  class ValidationError(Exception):
      def __init__(self, message):
          "ValidationError can be passed a string or a list."
          if isinstance(message, list):
              self.messages = message
keep add keep keep keep keep keep keep
 fixes #753 - ValidationError and CriticalValidationError now accept both strings and promises from gettext_lazy


git-svn-id: http://code.djangoproject.com/svn/django/trunk@1328 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/core/validators.py