RajeshD wrote: > Hi Daniel, > > As you've discovered, the built-in serializers require a Queryset of > model objects. > > You could use the simplejson library directly on your "values" > dictionary. > > Basically, > 1. import simplejson > 2. data = simplejson.dumps(your_dictionary_here) >
Thanks for the tip. I had already tried this but was getting an "is not serializable" TypeError. I hadn't realised that the list returned from a values() call is not actually a list, but a ValuesQuerySet. So to make it work you have to do simplejson.dumps(list(valuedictionary)) -- Daniel. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---