      classes or types -- at least one is needed so that the automatic forcing of
      the lazy evaluation code is triggered. Results are not memoized; the
      function is evaluated on every access.
      """
      class __proxy__:
          # This inner class encapsulates the code that should be evaluated
          # lazily. On calling of one of the magic methods it will force
          # the evaluation and store the result. Afterwards, the result
          # is delivered directly. So the result is memoized.
          def __init__(self, args, kw):
 
</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             assert isinstance(message, basestring), ("'%s' should be a string" % message)
 </s> add             assert isinstance(message, (basestring, Promise)), ("'%s' should be a string" % message)
    class __proxy__(Promise):
      classes or types -- at least one is needed so that the automatic forcing of
      the lazy evaluation code is triggered. Results are not memoized; the
      function is evaluated on every access.
      """
    class __proxy__(Promise):
          # This inner class encapsulates the code that should be evaluated
          # lazily. On calling of one of the magic methods it will force
          # the evaluation and store the result. Afterwards, the result
          # is delivered directly. So the result is memoized.
          def __init__(self, args, kw):
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/utils/functional.py