> > class Serializer(PythonSerializer): > def end_object(self, obj): > self.objects.append({ > "fields" : self._current > }) > self._current = None > >
I've made a small mistake I was importing PythonSerializer while It should've been JsonSerializer Corrected code bellow: from django.core.serializers.json import Serializer as JsonSerializer class Serializer(JsonSerializer): def end_object(self, obj): self.objects.append({ "fields" : self._current }) self._current = None -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.