Explorar o código

Fixed #10954 -- Corrected error in docs example describing extending the JSON serializer. Thanks to Glenn for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10654 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Russell Keith-Magee %!s(int64=16) %!d(string=hai) anos
pai
achega
e85bc81651
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      docs/topics/serialization.txt

+ 1 - 1
docs/topics/serialization.txt

@@ -187,7 +187,7 @@ them. Something like this will work::
         def default(self, obj):
             if isinstance(obj, Promise):
                 return force_unicode(obj)
-            return obj
+            return super(LazyEncoder, self).default(obj)
 
 .. _special encoder: http://svn.red-bean.com/bob/simplejson/tags/simplejson-1.7/docs/index.html