#4199: Error in Serialization docs?
--------------------------------------------+-------------------------------
Reporter:  Danny O'Brien <[EMAIL PROTECTED]>  |       Owner:  jacob        
  Status:  new                              |   Component:  Documentation
 Version:  SVN                              |    Keywords:               
   Stage:  Unreviewed                       |   Has_patch:  0            
--------------------------------------------+-------------------------------
 The last code example at
 http://www.djangoproject.com/documentation/0.96/serialization/
 suggests this code:
 {{{
 #!python
 json_serializer.serialize(queryset, ensure_ascii=False, stream=response)
 }}}
 
 but this returns
 <type 'exceptions.TypeError'>: unbound method serialize() must be called
 with Serializer instance as first argument (got QuerySet instance instead)
 
 perhaps this is what's meant?
 
 {{{
 #!python
 json_serializer = serializers.get_serializer("json")
 json_serializer().serialize(queryset, ensure_ascii=False, stream=response)
 }}}
 
 (this returns with an unexpected keyword argument error for stream
 however)

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4199>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to