djangosnippets.org: Latest snippets tagged with '0.96'https://djangosnippets.org/tags/096/2008-07-29T08:27:32.866839-05:00Serializing booleans correctly when doing dumpdata from a MySQL database using Django 0.96
2008-07-29T08:27:32.866839-05:00chrjhttps://djangosnippets.org/snippets/924/<p>Django 0.96 seems to have a bug when serializing from MySQL. BooleanFields are encoding as 0/1 instead of true/false. Hacking the python serializer seems to fix that. </p>
<p>The bug shows up as (fx. when using loaddata on a dump from MySQL in PostgreSQL):</p>
<pre><code>Problem installing fixture '/tmp/data.json': ERROR: column "is_staff" …</code></pre>
Freely redistributable