<?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 for Jeff Blaine</title>
	<atom:link href="http://www.kickflop.net/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kickflop.net/blog</link>
	<description></description>
	<lastBuildDate>Tue, 24 Jan 2012 21:15:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on Django: Taking note of ManyToManyField changes by Jeff Blaine</title>
		<link>http://www.kickflop.net/blog/2012/01/18/django-taking-note-of-manytomanyfield-changes/comment-page-1/#comment-134729</link>
		<dc:creator>Jeff Blaine</dc:creator>
		<pubDate>Tue, 24 Jan 2012 21:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kickflop.net/blog/?p=1417#comment-134729</guid>
		<description>Here&#039;s what I ended up doing today to address this as best as I can, even though it is inefficient to do:


def resave_bc_m2m_changed(sender, **kwargs):
    a = kwargs[&#039;action&#039;]
    if a == &#039;post_add&#039; or a == &#039;post_remove&#039;:
        kwargs[&#039;instance&#039;].save()
        # Don&#039;t do anything in pre/post_clear
        # for this effort

m2m_changed.connect(resave_bc_m2m_changed,
           sender=Netgroup.interfaces.through,
           weak=False)
m2m_changed.connect(resave_bc_m2m_changed,
           sender=NetgroupContainer.members.through,
           weak=False)
</description>
		<content:encoded><![CDATA[<p>Here&#8217;s what I ended up doing today to address this as best as I can, even though it is inefficient to do:</p>
<p>def resave_bc_m2m_changed(sender, **kwargs):<br />
    a = kwargs['action']<br />
    if a == &#8216;post_add&#8217; or a == &#8216;post_remove&#8217;:<br />
        kwargs['instance'].save()<br />
        # Don&#8217;t do anything in pre/post_clear<br />
        # for this effort</p>
<p>m2m_changed.connect(resave_bc_m2m_changed,<br />
           sender=Netgroup.interfaces.through,<br />
           weak=False)<br />
m2m_changed.connect(resave_bc_m2m_changed,<br />
           sender=NetgroupContainer.members.through,<br />
           weak=False)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django: Taking note of ManyToManyField changes by Jeff Blaine</title>
		<link>http://www.kickflop.net/blog/2012/01/18/django-taking-note-of-manytomanyfield-changes/comment-page-1/#comment-134727</link>
		<dc:creator>Jeff Blaine</dc:creator>
		<pubDate>Sun, 22 Jan 2012 22:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kickflop.net/blog/?p=1417#comment-134727</guid>
		<description>Reinout van Rees writes about his workaround here: http://reinout.vanrees.org/weblog/2011/11/29/many-to-many-field-save-method.html , which seems to essentially be what Jay has suggested above.</description>
		<content:encoded><![CDATA[<p>Reinout van Rees writes about his workaround here: http://reinout.vanrees.org/weblog/2011/11/29/many-to-many-field-save-method.html , which seems to essentially be what Jay has suggested above.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django: Taking note of ManyToManyField changes by Jay Wineinger</title>
		<link>http://www.kickflop.net/blog/2012/01/18/django-taking-note-of-manytomanyfield-changes/comment-page-1/#comment-134726</link>
		<dc:creator>Jay Wineinger</dc:creator>
		<pubDate>Fri, 20 Jan 2012 18:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kickflop.net/blog/?p=1417#comment-134726</guid>
		<description>As an off-the-cuff solution, you might be able to create a ModelForm and override save to calculate the changed M2M values before calling super(...).  You would need to retrieve the current DB values for the M2M, compare them to the form&#039;s cleaned_data, and calculate the set difference. I would call super and then send a custom signal with your changed M2M values.  You should be able to use the ModelForm for the admin and any other custom forms.

As to the failure of solutions 1 and 2, I believe they don&#039;t work because saving the model instance and saving the M2M data are separate. Thus, overriding save() and listening to post_save() will only have the old M2M data available.  Since M2Ms require all objects to have an ID/PK for the join table, this seems to be a necessity.</description>
		<content:encoded><![CDATA[<p>As an off-the-cuff solution, you might be able to create a ModelForm and override save to calculate the changed M2M values before calling super(&#8230;).  You would need to retrieve the current DB values for the M2M, compare them to the form&#8217;s cleaned_data, and calculate the set difference. I would call super and then send a custom signal with your changed M2M values.  You should be able to use the ModelForm for the admin and any other custom forms.</p>
<p>As to the failure of solutions 1 and 2, I believe they don&#8217;t work because saving the model instance and saving the M2M data are separate. Thus, overriding save() and listening to post_save() will only have the old M2M data available.  Since M2Ms require all objects to have an ID/PK for the join table, this seems to be a necessity.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Django: Taking note of ManyToManyField changes by Jeff Blaine</title>
		<link>http://www.kickflop.net/blog/2012/01/18/django-taking-note-of-manytomanyfield-changes/comment-page-1/#comment-134725</link>
		<dc:creator>Jeff Blaine</dc:creator>
		<pubDate>Thu, 19 Jan 2012 20:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kickflop.net/blog/?p=1417#comment-134725</guid>
		<description>I&#039;d like to add that this situation exists in 1.3.1 and 1.4-alpha-1 as well.  I have found no way to consistently and accurately determine, via model methods or signals, what m2m data has changed.</description>
		<content:encoded><![CDATA[<p>I&#8217;d like to add that this situation exists in 1.3.1 and 1.4-alpha-1 as well.  I have found no way to consistently and accurately determine, via model methods or signals, what m2m data has changed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Graphite for RHEL 5.7 by Jeff Blaine</title>
		<link>http://www.kickflop.net/blog/2011/11/01/graphite-for-rhel-5-7/comment-page-1/#comment-134723</link>
		<dc:creator>Jeff Blaine</dc:creator>
		<pubDate>Wed, 02 Nov 2011 13:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kickflop.net/blog/?p=1392#comment-134723</guid>
		<description>Thanks for commenting here Dan.  I may go that route.  I saw in the dep list of the official Graphite documentation &quot;Python 2.4 or higher (2.6 recommended)&quot; and just bailed on what I figured was going to be an inevitably failed package-based install of all of the pieces.  I may redo the effort using RHEL5&#039;s Python 2.4 after we&#039;ve played with it a bit, or maybe just finally get a RHEL6 image finalized for our environment.

Others reading this post + comments may also be interested in https://gist.github.com/889297</description>
		<content:encoded><![CDATA[<p>Thanks for commenting here Dan.  I may go that route.  I saw in the dep list of the official Graphite documentation &#8220;Python 2.4 or higher (2.6 recommended)&#8221; and just bailed on what I figured was going to be an inevitably failed package-based install of all of the pieces.  I may redo the effort using RHEL5&#8242;s Python 2.4 after we&#8217;ve played with it a bit, or maybe just finally get a RHEL6 image finalized for our environment.</p>
<p>Others reading this post + comments may also be interested in <a href="https://gist.github.com/889297" rel="nofollow">https://gist.github.com/889297</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Graphite for RHEL 5.7 by Anonymous</title>
		<link>http://www.kickflop.net/blog/2011/11/01/graphite-for-rhel-5-7/comment-page-1/#comment-134722</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 02 Nov 2011 10:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kickflop.net/blog/?p=1392#comment-134722</guid>
		<description>You might be interested in these RPMs: https://github.com/dcarley/graphite-rpms

The only essential dependency on EL5 that isn&#039;t fulfilled by the stock CentOS and EPEL repositories is python-twisted-core, which can be easily rebuilt from the EL6 sources.</description>
		<content:encoded><![CDATA[<p>You might be interested in these RPMs: https://github.com/dcarley/graphite-rpms</p>
<p>The only essential dependency on EL5 that isn&#8217;t fulfilled by the stock CentOS and EPEL repositories is python-twisted-core, which can be easily rebuilt from the EL6 sources.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Imagine Language Consolidation by Jeff Blaine</title>
		<link>http://www.kickflop.net/blog/2011/05/20/imagine-language-consolidation/comment-page-1/#comment-134720</link>
		<dc:creator>Jeff Blaine</dc:creator>
		<pubDate>Fri, 22 Jul 2011 15:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kickflop.net/blog/?p=1275#comment-134720</guid>
		<description>Hi Michael, thanks for reading and replying.

That&#039;s the argument I&#039;ve heard.  I don&#039;t disagree with you.  It&#039;s tricky this cost vs. actual reward thing, though, especially when both are very seldom honestly and critically judged (because of human nature).  The significant innovation of Ruby/Perl/Python compared to Ruby/Perl/Python is pretty hard to enumerate for me.  They all do the same thing in insignificantly different ways, and it&#039;s all the same stuff you could do in LISP 20+ years ago.

Remember too though that constraints are an amazing catalyst for innovation. 

Yeah, this is a huge multi-faceted and messy topic.  I&#039;m sure you and I could spend hours with it :)</description>
		<content:encoded><![CDATA[<p>Hi Michael, thanks for reading and replying.</p>
<p>That&#8217;s the argument I&#8217;ve heard.  I don&#8217;t disagree with you.  It&#8217;s tricky this cost vs. actual reward thing, though, especially when both are very seldom honestly and critically judged (because of human nature).  The significant innovation of Ruby/Perl/Python compared to Ruby/Perl/Python is pretty hard to enumerate for me.  They all do the same thing in insignificantly different ways, and it&#8217;s all the same stuff you could do in LISP 20+ years ago.</p>
<p>Remember too though that constraints are an amazing catalyst for innovation. </p>
<p>Yeah, this is a huge multi-faceted and messy topic.  I&#8217;m sure you and I could spend hours with it :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Imagine Language Consolidation by Michael Conigliaro</title>
		<link>http://www.kickflop.net/blog/2011/05/20/imagine-language-consolidation/comment-page-1/#comment-134719</link>
		<dc:creator>Michael Conigliaro</dc:creator>
		<pubDate>Fri, 22 Jul 2011 04:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kickflop.net/blog/?p=1275#comment-134719</guid>
		<description>I&#039;ve had similar thoughts in the past, but I also think the diversity of languages is good for innovation. To think of it another way, what if we all decided to standardize on PHP 10 years ago? ;-) I highly doubt PHP could have ever evolved to be as powerful as the Python or Ruby we have today.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve had similar thoughts in the past, but I also think the diversity of languages is good for innovation. To think of it another way, what if we all decided to standardize on PHP 10 years ago? ;-) I highly doubt PHP could have ever evolved to be as powerful as the Python or Ruby we have today.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on On Home Renovation by Jeremy Maziarz</title>
		<link>http://www.kickflop.net/blog/2011/06/26/on-home-renovation/comment-page-1/#comment-134718</link>
		<dc:creator>Jeremy Maziarz</dc:creator>
		<pubDate>Mon, 27 Jun 2011 16:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.kickflop.net/blog/?p=1318#comment-134718</guid>
		<description>Nice save. I like how you were determined not to let the door win. Having that attitude sometimes triggers something in your brain to be inventive.

I had a similar situation a few years ago with a hole saw. Stupidly, I used the wrong size (fortunately smaller)! What saved me was the scrap of plywood I was using to test hole sizes before drilling into the real piece. I centered the hole from the next size up over the smaller hole, clamped it in place and re-drilled  a nice clean hole.</description>
		<content:encoded><![CDATA[<p>Nice save. I like how you were determined not to let the door win. Having that attitude sometimes triggers something in your brain to be inventive.</p>
<p>I had a similar situation a few years ago with a hole saw. Stupidly, I used the wrong size (fortunately smaller)! What saved me was the scrap of plywood I was using to test hole sizes before drilling into the real piece. I centered the hole from the next size up over the smaller hole, clamped it in place and re-drilled  a nice clean hole.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on The Big 3 OSS Configuration Management Tool Dependencies by JB</title>
		<link>http://www.kickflop.net/blog/2011/02/15/the-big-3-oss-configuration-management-tool-dependencies/comment-page-1/#comment-134703</link>
		<dc:creator>JB</dc:creator>
		<pubDate>Thu, 17 Feb 2011 21:39:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.kickflop.net/blog/?p=1098#comment-134703</guid>
		<description>Thanks Alex - I&#039;ve added a &quot;MANY more?&quot; item to the table with an X for Chef and footnote.</description>
		<content:encoded><![CDATA[<p>Thanks Alex &#8211; I&#8217;ve added a &#8220;MANY more?&#8221; item to the table with an X for Chef and footnote.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

