<?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: A Django Model Manager for Soft Deleting Records and How to Customize the Django Admin</title>
	<atom:link href="http://codespatter.com/2009/07/01/django-model-manager-soft-delete-how-to-customize-admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://codespatter.com/2009/07/01/django-model-manager-soft-delete-how-to-customize-admin/</link>
	<description></description>
	<lastBuildDate>Thu, 04 Mar 2010 11:43:30 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Greg Allard</title>
		<link>http://codespatter.com/2009/07/01/django-model-manager-soft-delete-how-to-customize-admin/comment-page-1/#comment-15191</link>
		<dc:creator>Greg Allard</dc:creator>
		<pubDate>Mon, 10 Aug 2009 14:11:07 +0000</pubDate>
		<guid isPermaLink="false">http://codespatter.com/?p=467#comment-15191</guid>
		<description>That would work. If you are using a signal (pre_delete or post_delete), you might need to send it from the new function since you wouldn&#039;t want to call the real delete.&lt;br&gt;&lt;br&gt;I&#039;ve been doing object.deleted = 1 object.save() and not calling or overriding delete(). That way I still have the option to do the real delete in case I need it. You could probably make a real_delete() function to do that if needed though.</description>
		<content:encoded><![CDATA[<p>That would work. If you are using a signal (pre_delete or post_delete), you might need to send it from the new function since you wouldn&#39;t want to call the real delete.</p>
<p>I&#39;ve been doing object.deleted = 1 object.save() and not calling or overriding delete(). That way I still have the option to do the real delete in case I need it. You could probably make a real_delete() function to do that if needed though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://codespatter.com/2009/07/01/django-model-manager-soft-delete-how-to-customize-admin/comment-page-1/#comment-15190</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Mon, 10 Aug 2009 11:17:49 +0000</pubDate>
		<guid isPermaLink="false">http://codespatter.com/?p=467#comment-15190</guid>
		<description>I think I must be missing something, as I cant see where you&#039;re setting the flag &quot;deleted&quot;.&lt;br&gt;&lt;br&gt;Would overriding the models delete function, setting delete=True and saving suffice?</description>
		<content:encoded><![CDATA[<p>I think I must be missing something, as I cant see where you&#39;re setting the flag &#8220;deleted&#8221;.</p>
<p>Would overriding the models delete function, setting delete=True and saving suffice?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Allard</title>
		<link>http://codespatter.com/2009/07/01/django-model-manager-soft-delete-how-to-customize-admin/comment-page-1/#comment-15185</link>
		<dc:creator>Greg Allard</dc:creator>
		<pubDate>Wed, 22 Jul 2009 19:37:32 +0000</pubDate>
		<guid isPermaLink="false">http://codespatter.com/?p=467#comment-15185</guid>
		<description>I tested this out with a simple many to many example and I am not getting the soft deleted objects returned. With objects = SoftDeleteManager the many to many queries will be using get_query_set() which won&#039;t return the soft deleted records. I might need to see an example of how you are getting the deleted results to be able to figure out what is going on. I tried it with some_object.related_things.all() and the returned set won&#039;t have deleted related_things.</description>
		<content:encoded><![CDATA[<p>I tested this out with a simple many to many example and I am not getting the soft deleted objects returned. With objects = SoftDeleteManager the many to many queries will be using get_query_set() which won&#39;t return the soft deleted records. I might need to see an example of how you are getting the deleted results to be able to figure out what is going on. I tried it with some_object.related_things.all() and the returned set won&#39;t have deleted related_things.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sjstelmach</title>
		<link>http://codespatter.com/2009/07/01/django-model-manager-soft-delete-how-to-customize-admin/comment-page-1/#comment-15184</link>
		<dc:creator>sjstelmach</dc:creator>
		<pubDate>Wed, 22 Jul 2009 17:55:52 +0000</pubDate>
		<guid isPermaLink="false">http://codespatter.com/?p=467#comment-15184</guid>
		<description>Awesome tutorial... this has been really useful. One thing I&#039;ve had an issue with is related fields (specifically with to M2M relationships).&lt;br&gt;&lt;br&gt;A simplified version of my issue works kind of like this: I have a lot of models that all derive from a base content class (articles, images, galleries, etc.). Articles are able to have related content (via a many to many field), but when I soft delete content, it&#039;ll still show up in related content queries on my articles. Is there a good way to get this method working for inherited classes and/or m2m fields?</description>
		<content:encoded><![CDATA[<p>Awesome tutorial&#8230; this has been really useful. One thing I&#39;ve had an issue with is related fields (specifically with to M2M relationships).</p>
<p>A simplified version of my issue works kind of like this: I have a lot of models that all derive from a base content class (articles, images, galleries, etc.). Articles are able to have related content (via a many to many field), but when I soft delete content, it&#39;ll still show up in related content queries on my articles. Is there a good way to get this method working for inherited classes and/or m2m fields?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Allard</title>
		<link>http://codespatter.com/2009/07/01/django-model-manager-soft-delete-how-to-customize-admin/comment-page-1/#comment-15177</link>
		<dc:creator>Greg Allard</dc:creator>
		<pubDate>Thu, 02 Jul 2009 13:50:13 +0000</pubDate>
		<guid isPermaLink="false">http://codespatter.com/?p=467#comment-15177</guid>
		<description>You can do this.&lt;br&gt;from somewhere import SoftDeleteManager&lt;br&gt;&lt;br&gt;class NewManager(SoftDeleteManager):&lt;br&gt;    &#039;&#039;&#039;new stuff&#039;&#039;&#039;&lt;br&gt;&lt;br&gt;and in the model&lt;br&gt;objects = NewManager()</description>
		<content:encoded><![CDATA[<p>You can do this.<br />from somewhere import SoftDeleteManager</p>
<p>class NewManager(SoftDeleteManager):<br />    &#39;&#39;&#39;new stuff&#39;&#39;&#39;</p>
<p>and in the model<br />objects = NewManager()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Metin</title>
		<link>http://codespatter.com/2009/07/01/django-model-manager-soft-delete-how-to-customize-admin/comment-page-1/#comment-15176</link>
		<dc:creator>Metin</dc:creator>
		<pubDate>Thu, 02 Jul 2009 08:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://codespatter.com/?p=467#comment-15176</guid>
		<description>Great writeup, thanks for that! I&#039;ll have question though.&lt;br&gt;Say I import SoftDeleteManager from an external file and use it with objects = SoftDeleteManager()&lt;br&gt;But now, I loose ability to define additional custom manager methods because objecst is already assigned, right? Is there a way to solve this other than inheriting from multiple manager classes?&lt;br&gt;&lt;br&gt;Metin</description>
		<content:encoded><![CDATA[<p>Great writeup, thanks for that! I&#39;ll have question though.<br />Say I import SoftDeleteManager from an external file and use it with objects = SoftDeleteManager()<br />But now, I loose ability to define additional custom manager methods because objecst is already assigned, right? Is there a way to solve this other than inheriting from multiple manager classes?</p>
<p>Metin</p>
]]></content:encoded>
	</item>
</channel>
</rss>
