djangosnippets.org: Latest snippets tagged with 'valuesqueryset'https://djangosnippets.org/tags/valuesqueryset/2011-06-03T09:54:28.709401-05:00Convert a ValuesQuerySet to an array of dicts (useful for serializing)
2011-06-03T09:54:28.709401-05:00waitinforatrainhttps://djangosnippets.org/snippets/2454/<p>Perhaps this is blindingly obvious but I spent a while trying to get this, before figuring out that when a each item of an iterated ValuesQuerySet is a dict.</p>
<p>Useful for serialising to JSON or XML etc.</p>
Freely redistributable