<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Use Django Fixtures to Automatically Load Data when You Install an App</title>
	<atom:link href="http://solutions.treypiepmeier.com/2008/09/28/use-django-fixtures-to-automatically-load-data-when-you-install-an-app/feed/" rel="self" type="application/rss+xml" />
	<link>http://solutions.treypiepmeier.com/2008/09/28/use-django-fixtures-to-automatically-load-data-when-you-install-an-app/</link>
	<description>So I don&#039;t have to figure things out more than once.</description>
	<lastBuildDate>Sat, 07 Aug 2010 23:10:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Tanner Netterville</title>
		<link>http://solutions.treypiepmeier.com/2008/09/28/use-django-fixtures-to-automatically-load-data-when-you-install-an-app/comment-page-1/#comment-51294</link>
		<dc:creator>Tanner Netterville</dc:creator>
		<pubDate>Mon, 27 Apr 2009 19:54:14 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=166#comment-51294</guid>
		<description>&lt;p&gt;one more thing about my method, my file dump.json... at any given moment I have no idea what is in it, I always overwrite the same file as I am about to reset and load it.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>one more thing about my method, my file dump.json&#8230; at any given moment I have no idea what is in it, I always overwrite the same file as I am about to reset and load it.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Tanner Netterville</title>
		<link>http://solutions.treypiepmeier.com/2008/09/28/use-django-fixtures-to-automatically-load-data-when-you-install-an-app/comment-page-1/#comment-51293</link>
		<dc:creator>Tanner Netterville</dc:creator>
		<pubDate>Mon, 27 Apr 2009 19:52:01 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=166#comment-51293</guid>
		<description>&lt;p&gt;Haven&#039;t looked into this too deeply but my common process for updating a model is basically the same thing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make changes to the model, but don&#039;t save&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$ python manage.py dumpdata [app] &gt; dump.json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Save the changed models.py&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$ python manage.py reset [app]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$ python manage.py loaddata dump.json&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I thought about trying to automate this because it happens fairly regularly with new apps, but I haven&#039;t devoted time to it because in order to use &lt;code&gt;dumpdata&lt;/code&gt; the model has to match the database or it will throw errors.&lt;/p&gt;

&lt;p&gt;When I get ahead of myself and save before I &lt;code&gt;dumpdata&lt;/code&gt; I have to go back and comment out the new field or revert the changed field temporarily.&lt;/p&gt;

&lt;p&gt;I think this definitely warrants some good time and effort.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Haven&#8217;t looked into this too deeply but my common process for updating a model is basically the same thing:</p>

<ol>
<li>Make changes to the model, but don&#8217;t save</li>
<li><code>$ python manage.py dumpdata [app] &gt; dump.json</code></li>
<li>Save the changed models.py</li>
<li><code>$ python manage.py reset [app]</code></li>
<li><code>$ python manage.py loaddata dump.json</code></li>
</ol>

<p>I thought about trying to automate this because it happens fairly regularly with new apps, but I haven&#8217;t devoted time to it because in order to use <code>dumpdata</code> the model has to match the database or it will throw errors.</p>

<p>When I get ahead of myself and save before I <code>dumpdata</code> I have to go back and comment out the new field or revert the changed field temporarily.</p>

<p>I think this definitely warrants some good time and effort.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Kersey</title>
		<link>http://solutions.treypiepmeier.com/2008/09/28/use-django-fixtures-to-automatically-load-data-when-you-install-an-app/comment-page-1/#comment-51291</link>
		<dc:creator>Josh Kersey</dc:creator>
		<pubDate>Mon, 27 Apr 2009 19:22:42 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=166#comment-51291</guid>
		<description>&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Test of Trey&#039;s WMD&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;in his solutions log.&lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;This is a pretty cool trick.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What...another paragraph.&lt;/strong&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<ul>
<li><p>Test of Trey&#8217;s WMD</p>

<ul><li>in his solutions log.</li></ul>

<p>This is a pretty cool trick.</p></li>
</ul>

<p><strong>What&#8230;another paragraph.</strong></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Kersey</title>
		<link>http://solutions.treypiepmeier.com/2008/09/28/use-django-fixtures-to-automatically-load-data-when-you-install-an-app/comment-page-1/#comment-51290</link>
		<dc:creator>Josh Kersey</dc:creator>
		<pubDate>Mon, 27 Apr 2009 19:21:05 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=166#comment-51290</guid>
		<description>&lt;p&gt;I second the motion for the magical script.  Especially one that would reload data from all available fixtures or at least give the ability to specify more than one fixture.  Good call.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I second the motion for the magical script.  Especially one that would reload data from all available fixtures or at least give the ability to specify more than one fixture.  Good call.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Trey</title>
		<link>http://solutions.treypiepmeier.com/2008/09/28/use-django-fixtures-to-automatically-load-data-when-you-install-an-app/comment-page-1/#comment-25060</link>
		<dc:creator>Trey</dc:creator>
		<pubDate>Tue, 21 Oct 2008 20:11:08 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=166#comment-25060</guid>
		<description>&lt;p&gt;Something about this setup makes me think it could be used to do some basic data migration.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Load data in the database.&lt;/li&gt;
&lt;li&gt;Change schema in &lt;code&gt;models.py&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Run a magical script that
&lt;ul&gt;&lt;li&gt;Creates a fixture from the existing data&lt;/li&gt;
&lt;li&gt;Wipes the database&lt;/li&gt;
&lt;li&gt;Syncs the database from the schema&lt;/li&gt;
&lt;li&gt;Reloads data from the fixtures&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It&#039;s not versioned like a proper migration, but it would be better than the default option of creating new fields manually.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Something about this setup makes me think it could be used to do some basic data migration.</p>

<ul>
<li>Load data in the database.</li>
<li>Change schema in <code>models.py</code>.</li>
<li>Run a magical script that
<ul><li>Creates a fixture from the existing data</li>
<li>Wipes the database</li>
<li>Syncs the database from the schema</li>
<li>Reloads data from the fixtures</li></ul></li>
</ul>

<p>It&#8217;s not versioned like a proper migration, but it would be better than the default option of creating new fields manually.</p>]]></content:encoded>
	</item>
</channel>
</rss>
