<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Possibility and Probability &#187; django</title>
	<atom:link href="http://ironboundsoftware.com/blog/category/django/feed/" rel="self" type="application/rss+xml" />
	<link>http://ironboundsoftware.com/blog</link>
	<description>Droplets of Yes and No</description>
	<lastBuildDate>Wed, 28 Dec 2011 01:37:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Today&#8217;s Django lesson</title>
		<link>http://ironboundsoftware.com/blog/2011/12/27/todays-django-lesson/</link>
		<comments>http://ironboundsoftware.com/blog/2011/12/27/todays-django-lesson/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 01:37:16 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[django]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://ironboundsoftware.com/blog/?p=400</guid>
		<description><![CDATA[Today I was working on re-doing my main website. I have built the site in Django, and then when I&#8217;m ready to publish I use the static generator module to create an html snapshot of the pages that I then upload to the server. Basically I wanted the fun of using Django, but the ease [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was working on re-doing <a href="http://ironboundsoftware.com">my main website</a>. I have built the site in <a href="https://www.djangoproject.com/">Django</a>, and then when I&#8217;m ready to publish I use the static generator module to create an html snapshot of the pages that I then upload to the server. Basically I wanted the fun of using Django, but the ease of serving up static html pages.</p>
<p>The last time I did this, the version of Django was 0.9 and today&#8217;s version is 1.3.1. As a I started work on the site I discovered some things here and there that had changed in the years in-between those version. The one that bit me the hardest was this: I could view the main page (/), but any other page (including index) would give me a 404 error.</p>
<p>This was really weird because the mappings existed in the urls.py file, but a 404 error means it couldn&#8217;t be found. If it was a programmatic error you would expect a 500 error, but I never saw one.</p>
<p>Slowly but surely I tore the system apart looking to see what could cause mapped urls to disappear in Django. Eventually I discovered the root cause was how static resources are handled.</p>
<p>One of the changes in the new versions of Django was to add functionality for handling static resources. The biggest change (at least as far as my ancient code was concerned) was in introduction of the STATIC_URL variable. According the documentation this is the prefix for static resources (like css, javascript) that are referenced by the web page that is being built by Django.</p>
<p>In my laziness many years ago, I just plopped the main CSS file (and everything else) in the root of the web directory so that in the html pages didn&#8217;t have to have paths on them. So when I was adding the STATIC_URL variable to make sure my CSS file would actually load, I set the variable this way:</p>
<blockquote><p>STATIC_URL = &#8216;/&#8217;</p></blockquote>
<p>&#8230;because it wouldn&#8217;t let me put an empty string of &#8221;. Well, it turns out that this was wrong wrong wrong. Django was looking at the incoming requests as I tried to visit the pages of the site and checking the static directory to see if there was anything there (which there wasn&#8217;t, just my CSS file).</p>
<p>Once I realized this, I changed it to:</p>
<blockquote><p>STATIC_URL = &#8216;/static/&#8217;</p></blockquote>
<p>&#8230;which basically forces you to create a directory to hold your static files. Which is right right right right. Basically Django was forcing me to clean up my act and code the site in a much cleaner manner. As soon as I did that all of the 404 errors went away and I was able to hit every page in my urls.py file.</p>
]]></content:encoded>
			<wfw:commentRss>http://ironboundsoftware.com/blog/2011/12/27/todays-django-lesson/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Matching resumes to jobs</title>
		<link>http://ironboundsoftware.com/blog/2009/10/03/matching-resumes-to-jobs/</link>
		<comments>http://ironboundsoftware.com/blog/2009/10/03/matching-resumes-to-jobs/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 21:50:48 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[AI]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.ironboundsoftware.com/blog/?p=309</guid>
		<description><![CDATA[Have you ever looked at a job posting and tried to figure out if you are a good match for that job? I&#8217;ve written a Google App Engine application to try and help people figure that out. Paste in a copy of your resume and a copy of the job description, and it will try [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever looked at a job posting and tried to figure out if you are a good match for that job?</p>
<p>I&#8217;ve written a Google App Engine application to try and help people figure that out. Paste in a copy of your resume and a copy of the job description, and it will try and figure out how well of a match you would be for that job.</p>
<p>Check it out: <a href="http://app.ironboundsoftware.com">http://app.ironboundsoftware.com</a></p>
<p>I&#8217;m really impressed with the Google App Engine environment (go Python!) and had fun writing this. Hopefully this will help people out in their job hunt. Times are tough, and hopefully this little application will help someone get into the perfect job for them.</p>
<p>Try it out and let me know what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://ironboundsoftware.com/blog/2009/10/03/matching-resumes-to-jobs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to kill momentum instantly</title>
		<link>http://ironboundsoftware.com/blog/2009/02/16/how-to-kill-momentum-instantly/</link>
		<comments>http://ironboundsoftware.com/blog/2009/02/16/how-to-kill-momentum-instantly/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 21:58:35 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[django]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.ironboundsoftware.com/blog/2009/02/16/how-to-kill-momentum-instantly/</guid>
		<description><![CDATA[Get the itch to finish a stale project Carve out some time to work on stale project Upgrade your software stack to make sure you are current* Spend hours figuring out something simple isn&#8217;t working Curse, debug, repeat Curse more when you realize that step 3 was where the train went off the rails Yes, [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Get the itch to finish a stale project</li>
<li>Carve out some time to work on stale project</li>
<li>Upgrade your software stack to make sure you are current*</li>
<li>Spend hours figuring out something simple isn&#8217;t working</li>
<li>Curse, debug, repeat</li>
<li>Curse more when you realize that step 3 was where the train went off the rails</li>
</ol>
<p>Yes, I made the mistake to upgrading the Google App Engine Launcher only to discover that for some reason it doesn&#8217;t play nice with the Django Helper project (or apparently the latest version of Django).</p>
<p>*sigh*</p>
<p>I know, I can go and continue development without those tools, but I was really looking forward to playing with the AppEngine (using a Django project).</p>
<p>Some days you are the pigeon, some days you are the statue.</p>
]]></content:encoded>
			<wfw:commentRss>http://ironboundsoftware.com/blog/2009/02/16/how-to-kill-momentum-instantly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unicode: Feel the burn</title>
		<link>http://ironboundsoftware.com/blog/2009/01/18/unicode-feel-the-burn/</link>
		<comments>http://ironboundsoftware.com/blog/2009/01/18/unicode-feel-the-burn/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 02:15:27 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[django]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.ironboundsoftware.com/blog/2009/01/18/unicode-feel-the-burn/</guid>
		<description><![CDATA[There&#8217;s nothing worse than having a program that has been running great for X amount of time suddenly start crashing. Especially when you discover that its choking on unicode characters you didn&#8217;t expect. With web addresses (or URLs if you prefer) starting to have unicode values in them, this is a problem that will probably [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s nothing worse than having a program that has been running great for X amount of time suddenly start crashing. Especially when you discover that its choking on unicode characters you didn&#8217;t expect.</p>
<p>With web addresses (or URLs if you prefer) starting to have unicode values in them, this is a problem that will probably be more common. I noticed this problem when trying to get to web pages that had special characters in them (for example, URLs that feature characters with accent symbols such as in the Spanish language) would cause urllib2.open() to fail. Several website suggested url encoding these special characters, but I didn&#8217;t have much luck with it.</p>
<p>Also today I was using Django&#8217;s model layer to store some data (web pages) into a database so I could try some things out. Even though Django is unicode friendly, if there&#8217;s the slightest problem in mapping text it will pull out the dreaded UnicodeDecodeError at some point.</p>
<p>To get around this I wound up just using unicode(text, errors=&#8217;ignore&#8217;) to make sure that the text that was being passed in was indeed unicode, and to ignore any errors that cropped up. Not ideal, the better solution would be to map correctly, but better than being stuck with data you can&#8217;t load/process.</p>
]]></content:encoded>
			<wfw:commentRss>http://ironboundsoftware.com/blog/2009/01/18/unicode-feel-the-burn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

