          "ValidationError can be passed a string or a list."
          if isinstance(message, list):
              self.messages = message
          else:
              assert isinstance(message, basestring), ("%s should be a string" % repr(message))
              self.messages = [message]
      def __str__(self):
          # This is needed because, without a __str__(), printing an exception
          # instance would result in this:
          # AttributeError: ValidationError instance has no attribute 'args'
 
</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     class __proxy__:
 </s> add     class __proxy__(Promise):
            assert isinstance(message, (basestring, Promise)), ("%s should be a string" % repr(message))
          "ValidationError can be passed a string or a list."
          if isinstance(message, list):
              self.messages = message
          else:
            assert isinstance(message, (basestring, Promise)), ("%s should be a string" % repr(message))
              self.messages = [message]
      def __str__(self):
          # This is needed because, without a __str__(), printing an exception
          # instance would result in this:
          # AttributeError: ValidationError instance has no attribute 'args'
keep keep keep keep replace 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