<?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: Django, image uploading, validation and newforms</title>
	<atom:link href="http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/</link>
	<description>Everything considered harmful</description>
	<lastBuildDate>Thu, 04 Mar 2010 12:28:24 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Collin</title>
		<link>http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/comment-page-1/#comment-52941</link>
		<dc:creator>Collin</dc:creator>
		<pubDate>Sat, 16 Feb 2008 05:58:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/#comment-52941</guid>
		<description>&lt;p&gt;This post is outdated now - if you&#039;re using the latest django, do not follow this post.&lt;/p&gt;

&lt;p&gt;It is quite helpful for 0.96, however :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This post is outdated now &#8211; if you&#8217;re using the latest django, do not follow this post.</p>

<p>It is quite helpful for 0.96, however <img src='http://www.oluyede.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
	<item>
		<title>By: Lawrence</title>
		<link>http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/comment-page-1/#comment-49621</link>
		<dc:creator>Lawrence</dc:creator>
		<pubDate>Fri, 21 Sep 2007 07:01:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/#comment-49621</guid>
		<description>&lt;p&gt;Thanks for the tip :-)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for the tip <img src='http://www.oluyede.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/comment-page-1/#comment-49571</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Thu, 20 Sep 2007 23:39:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/#comment-49571</guid>
		<description>&lt;p&gt;Looks a little different for the latest version of DJANGO... or whichever one I have in svn...&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;They now check the images for you (tested it)  So you can avoid the cool hack.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In order to access the filename and content, treat them as fields, ie:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;change:&lt;/p&gt;

&lt;p&gt;t.save_photo_file(photo[&#039;filename&#039;], photo[&#039;content&#039;])&lt;/p&gt;

&lt;p&gt;to:&lt;/p&gt;

&lt;p&gt;t.save_photo_file(photo.filename, photo.content)&lt;/p&gt;

&lt;p&gt;Nonetheless, great post! -- I was searching for ages on making just basic photo uploading work through the new forms, and this is the only site that was helpful.  Also, if your urls are screwed up after that... check out your settings file values for MEDIA_ROOT, MEDIA_URL, MEDIA_ADMIN - and play with those until it works (also whatever you have as &#039;upload_to&#039; in your model for the ImageField)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Looks a little different for the latest version of DJANGO&#8230; or whichever one I have in svn&#8230;</p>

<ol>
<li><p>They now check the images for you (tested it)  So you can avoid the cool hack.</p></li>
<li><p>In order to access the filename and content, treat them as fields, ie:</p></li>
</ol>

<p>change:</p>

<p>t.save_photo_file(photo['filename'], photo['content'])</p>

<p>to:</p>

<p>t.save_photo_file(photo.filename, photo.content)</p>

<p>Nonetheless, great post! &#8212; I was searching for ages on making just basic photo uploading work through the new forms, and this is the only site that was helpful.  Also, if your urls are screwed up after that&#8230; check out your settings file values for MEDIA_ROOT, MEDIA_URL, MEDIA_ADMIN &#8211; and play with those until it works (also whatever you have as &#8216;upload_to&#8217; in your model for the ImageField)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2007-09-03 &#171; PaxoBlog</title>
		<link>http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/comment-page-1/#comment-47476</link>
		<dc:creator>links for 2007-09-03 &#171; PaxoBlog</dc:creator>
		<pubDate>Mon, 03 Sep 2007 23:29:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/#comment-47476</guid>
		<description>&lt;p&gt;[...] A song for the lovers » Django, image uploading, validation and newforms One of the top questions about newforms is how to upload a file and validate it in some way. It is imperative for our example to hook into the newforms’ validation system otherwise we won’t gain any advantage. Let’s move on, then. (tags: django forms newforms image upload validation file tutorial) [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] A song for the lovers » Django, image uploading, validation and newforms One of the top questions about newforms is how to upload a file and validate it in some way. It is imperative for our example to hook into the newforms’ validation system otherwise we won’t gain any advantage. Let’s move on, then. (tags: django forms newforms image upload validation file tutorial) [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Tiago Bastos</title>
		<link>http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/comment-page-1/#comment-46647</link>
		<dc:creator>Tiago Bastos</dc:creator>
		<pubDate>Sun, 26 Aug 2007 00:56:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/#comment-46647</guid>
		<description>&lt;p&gt;Thanks man, you help me a lot!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks man, you help me a lot!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: &#187; Django file upload</title>
		<link>http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/comment-page-1/#comment-44352</link>
		<dc:creator>&#187; Django file upload</dc:creator>
		<pubDate>Sun, 29 Jul 2007 22:23:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/#comment-44352</guid>
		<description>&lt;p&gt;[...] Django image upload and validation. The author uses a model for the file and its related data. The uploaded file is saved by calling the save_FOO_file method. (This method is automatically provided by Django for fields declared as models.ImageField or models.FileField in the model. See the db-api documentation.) [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Django image upload and validation. The author uses a model for the file and its related data. The uploaded file is saved by calling the save_FOO_file method. (This method is automatically provided by Django for fields declared as models.ImageField or models.FileField in the model. See the db-api documentation.) [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Lawrence</title>
		<link>http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/comment-page-1/#comment-43786</link>
		<dc:creator>Lawrence</dc:creator>
		<pubDate>Sat, 21 Jul 2007 01:57:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/#comment-43786</guid>
		<description>&lt;p&gt;@Priyesh: not at all. You can just call t.save() after modifying t.name&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Priyesh: not at all. You can just call t.save() after modifying t.name</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Priyesh Jain</title>
		<link>http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/comment-page-1/#comment-43785</link>
		<dc:creator>Priyesh Jain</dc:creator>
		<pubDate>Sat, 21 Jul 2007 01:52:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/#comment-43785</guid>
		<description>&lt;p&gt;Would I need to add another save function after the &quot;save_photo_file&quot; function in order to save the t.name?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Would I need to add another save function after the &#8220;save_photo_file&#8221; function in order to save the t.name?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Brad Whittington</title>
		<link>http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/comment-page-1/#comment-42825</link>
		<dc:creator>Brad Whittington</dc:creator>
		<pubDate>Thu, 12 Jul 2007 13:40:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/#comment-42825</guid>
		<description>&lt;p&gt;There is a &quot;best practice&quot; file upload script on http://www.djangosnippets.org/snippets/95/&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>There is a &#8220;best practice&#8221; file upload script on <a href="http://www.djangosnippets.org/snippets/95/" rel="nofollow">http://www.djangosnippets.org/snippets/95/</a></p>]]></content:encoded>
	</item>
	<item>
		<title>By: yezooz</title>
		<link>http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/comment-page-1/#comment-39454</link>
		<dc:creator>yezooz</dc:creator>
		<pubDate>Sat, 09 Jun 2007 03:50:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.oluyede.org/blog/2007/03/18/django-image-uploading-validation-and-newforms/#comment-39454</guid>
		<description>&lt;p&gt;From version 0.96 use &quot;cleaned_data&quot; instead of &quot;clean_data&quot;&lt;/p&gt;

&lt;p&gt;http://code.djangoproject.com/changeset/5237&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>From version 0.96 use &#8220;cleaned_data&#8221; instead of &#8220;clean_data&#8221;</p>

<p><a href="http://code.djangoproject.com/changeset/5237" rel="nofollow">http://code.djangoproject.com/changeset/5237</a></p>]]></content:encoded>
	</item>
</channel>
</rss>
