<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Eddie Welker.com &#187; django</title>
	<atom:link href="http://www.eddiewelker.com/category/django/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eddiewelker.com</link>
	<description>Hahaha.</description>
	<lastBuildDate>Thu, 01 Apr 2010 01:53:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing PIL inside virtualenv for Ubuntu 9.10</title>
		<link>http://www.eddiewelker.com/2010/03/31/installing-pil-virtualenv-ubuntu/</link>
		<comments>http://www.eddiewelker.com/2010/03/31/installing-pil-virtualenv-ubuntu/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 01:50:42 +0000</pubDate>
		<dc:creator>Eddie</dc:creator>
				<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.eddiewelker.com/?p=322</guid>
		<description><![CDATA[I just removed a (real live) bat from my living room.  That was easier than installing PIL in a virtualenv for Ubuntu 9.10. Why?  Googling the subject seems to bring up a lot of old or mis-information.  This will explain how&#8230; mostly so I can do it again next time.
I started with a &#8211;no-site-packages virtualenv, [...]]]></description>
			<content:encoded><![CDATA[<p>I just removed a (real live) bat from my living room.  That was easier than installing PIL in a virtualenv for Ubuntu 9.10. Why?  Googling the subject seems to bring up a lot of old or mis-information.  This will explain how&#8230; mostly so I can do it again next time.</p>
<p>I started with a &#8211;no-site-packages virtualenv, so as not to use (or more  importantly depend) on any of the global site-packages.  Ok, cool.</p>
<p><code>$ virtualenv --no-site-packages myEnv</code></p>
<p>First, I needed to install the python developer tools. (Use apt-get or aptitude, whatever floats your boat)</p>
<p><code>$ sudo aptitude install python-dev</code></p>
<p>Then, I needed to install libjpeg and libjpeg-dev.  I&#8217;m not sure why, but I needed libjpeg simply doesn&#8217;t exist, so I needed to install libjpeg62.  I can&#8217;t pretend that I know the difference (or if there is one).  In fact, I may have gotten away with installing libjpeg62 and libjpeg-dev (rather than both &#8220;62&#8243; versions&#8230; libjpeg62 and libjpeg62-dev), but only further testing will tell.</p>
<p>Why? If you install PIL without this library, you&#8217;ll get those wonderful &#8220;decoder jpeg not available&#8221; messages in Python.  Or worse yet, if you&#8217;re trying to use it in a Django, you may get some errors (specifically the &#8220;Upload a valid image. The file you uploaded was either not an image or a corrupted image&#8221; warning), or you may not get any until you open the shell.  Either way, you can test with the method listed below.  If you get the &#8220;decoder jpeg not available&#8221; message, your install didn&#8217;t work.</p>
<p>The zlib package handles PNGs.</p>
<p><code>$ sudo aptitude install libjpeg62 libjpeg62-dev<br />
$ sudo aptitude install zlib1g-dev<br />
$ sudo aptitude install libfreetype6 libfreetype6-dev</code></p>
<p>Alright, now we seem to be done with the prerequisites. Start your virtualenv (of course, myEnv in the example is the name of your virtualenv).</p>
<p><code>$ source myEnv/bin/activate</code></p>
<p>Download PIL and install.  This will make sure to install PIL within your virtualenv&#8217;s site-packages.</p>
<p><code>(myEnv)$ wget http://effbot.org/downloads/Imaging-1.1.7.tar.gz<br />
(myEnv)$ tar zxvf Imaging-1.1.7.tar.gz<br />
(myEnv)$ cd Imaging-1.1.7<br />
(myEnv)$ python setup.py install</code></p>
<p>If you run into further problems (the &#8220;decoder jpeg not available&#8221; message again), you may have to resort to the <a href="http://effbot.org/zone/pil-decoder-jpeg-not-available.htm" target="_self">long directions</a> to get PIL and libjpeg to play happily together, but I hope not.</p>
<p>Now that you have everything installed, test it.  Open up a python shell from within your virtualenv.</p>
<p><code>(myEnv)$ python</code></p>
<p>Now try the following (with an image in your home directory) to see if everything is running smoothly.</p>
<p><code>&gt;&gt;&gt; from PIL import Image<br />
&gt;&gt;&gt; i = Image.open('/home/username/someJpeg.jpg')<br />
&gt;&gt;&gt; i.save('/home/username/someOtherJpeg.jpg')</code></p>
<p>If all of that works, you should now be ready to work.</p>
<p>Note: I would love to install the jpeg, freetype and zlib packages locally as well, but that was a step beyond what I was willing to mess with.  Maybe for a future set of instructions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eddiewelker.com/2010/03/31/installing-pil-virtualenv-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Django 1.0</title>
		<link>http://www.eddiewelker.com/2008/09/03/django-10/</link>
		<comments>http://www.eddiewelker.com/2008/09/03/django-10/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 02:08:48 +0000</pubDate>
		<dc:creator>Eddie</dc:creator>
				<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.eddiewelker.com/?p=111</guid>
		<description><![CDATA[Sweet, Django 1.0 has been released.
]]></description>
			<content:encoded><![CDATA[<p>Sweet, <a href="http://www.djangoproject.com/download/">Django 1.0 has been released</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eddiewelker.com/2008/09/03/django-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Review of &#8220;Learning Website Development with Django&#8221;</title>
		<link>http://www.eddiewelker.com/2008/07/07/review-of-learning-website-development-with-django/</link>
		<comments>http://www.eddiewelker.com/2008/07/07/review-of-learning-website-development-with-django/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 04:09:03 +0000</pubDate>
		<dc:creator>Eddie</dc:creator>
				<category><![CDATA[books]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[application framework]]></category>
		<category><![CDATA[ayman hourieh]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://edwardwelker.com/2008/07/07/review-of-learning-website-development-with-django/</guid>
		<description><![CDATA[Over the past few weeks, I&#8217;ve been playing around with Django.  Because of that, I&#8217;ve been looking at a few different books on the subject.  I first started out with the Django Book, which took me a few days to read.  I can&#8217;t say I absorbed it all, but I got the general idea.  Then [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.packtpub.com/django-website-development-tutorial/book"><img src="http://www.eddiewelker.com/wp-content/uploads/2008/07/learningwebsitedjango.jpg" title="Cover, Learning Website Development with Django" alt="Cover, Learning Website Development with Django" align="left" border="0" hspace="12" vspace="12" /></a>Over the past few weeks, I&#8217;ve been playing around with Django.  Because of that, I&#8217;ve been looking at a few different books on the subject.  I first started out with the <a href="http://www.djangobook.com/en/1.0/">Django Book</a>, which took me a few days to read.  I can&#8217;t say I absorbed it all, but I got the general idea.  Then I decided to look into other books and found <a href="http://www.packtpub.com/django-website-development-tutorial/book"><em>Learning Website Development with Django</em></a>, by <a href="http://aymanh.com/">Ayman Hourieh</a>.   I started right away.</p>
<p>The book&#8217;s subtitle, &#8220;<em>A beginner&#8217;s tutorial to building web applications, quickly and cleanly, with the Django application framework</em>,&#8221; frames the book perfectly.  Its target audience is programmers (moderately) familiar with Python, but who are, at the same time, new to Django.  The book is really focused towards this audience.  The other key word in the subtitle is &#8220;quickly.&#8221;  This book moves along in a hurry while creating the demonstration app.  I was quite comfortable (and pleased) by the pace, however, I can imagine that a more novice programmer may have a harder time dealing with the information flying by.</p>
<p>The book centers on building one app, a social bookmarking website similar to <a href="http://del.icio.us/">del.icio.us</a>, or <a href="http://ma.gnolia.com/">ma.gnolia</a>.  I think type of site was a good choice, since it provides the author with a varying degree of complexity to play around with.  It allowed Mr. Hourieh to start with the basics.  This book succeeds in starting simple and getting harder as it goes along.  I also thought it was good to focus on creating just one website, rather than a bunch of mini-projects or examples, since it models a more real-life situation.  The idea of a social bookmarking website, as well, is very useful because its features are currently <em>en vogue</em>, and can be found on many current sites.</p>
<p>Chapters One and Two are the obligatory &#8220;what is Django&#8221; and &#8220;how to install&#8221; chapters.  The meat of the book starts in Chapter Three when the project is introduced.   By the end of this third chapter, we&#8217;ve already quickly written three database models (Links, Users, and Bookmarks) and the main page.  Chapter Four introduces Django&#8217;s built-in user authentication system (django.contrib.auth), and describes how to write login, logout, and registration pages.  Chapter Five instructs us to write an additional database model (tags), which is more complex than the models we wrote previously.  Here we also write pages to display the list of bookmarks, bookmarks by tags, and a tag cloud.  [To illustrate how fast we're moving, Chapter Five ends on page 91]</p>
<p>Mr. Hourieh adds occasional asides throughout <em>Learning Website Development with Django, </em>such as one on security at the end of Chapter Five.  Personally, I&#8217;d have liked to see more of these, but I think he consciously limited the number to better suit the book&#8217;s audience.</p>
<p>Chapter Six introduces <st1:city><st1:place>AJAX</st1:place></st1:city> behaviors, using the jQuery library.  The author includes a lightning-fast tutorial on jQuery.  The reader is then shown how to implement a live search display, in-place bookmark editing, and a tag auto-complete feature.  Chapter Seven adds both a voting and commenting system to our application.  The user writes a new database model (Shared Bookmark), and shows how to implement comments piggy-backing on Django&#8217;s built-in comment system (django.contrib.comments).</p>
<p>In Chapter Eight, we are finally introduced to Django&#8217;s built-in Administration Interface (django.contrib.admin), and the reader is shown how to customize the admin pages and deal with user permissions.  Chapter Nine describes adding RSS feeds, Pagination, and advanced search capabilities to our application.  We&#8217;re taught how to create advanced model queries using both the objects.filter() function and Q objects to build multi-faceted queries.</p>
<p>Chapter Ten focuses on adding a &#8220;Friend&#8221; data model to the application.  This chapter demonstrates how Django can be used to send email (friend &#8216;invites&#8217; in this case), and how the bookmark application can be used to handle activation links.  Chapter Eleven covers three topics; language translation, caching, and unit testing.  None of these are as &#8220;flashy&#8221; as the previously covered topics, but they are given adequate mention. The final chapter, Chapter Twelve mentions a number of advanced topics that the reader is left to research on his/her own.</p>
<p>The book is generally well written.  I like the structure.  The chapter beginnings outline a plan for implementation, and the remainders proceede step-by-step.  I would have liked the writing to have been polished a little more.  The language seems too formal in places, and when you mix in a number of technical ideas, the language can distract.  This however, may just be a personal preference.</p>
<p>The more I think about <em>Learning Website Development with Django</em>, the more I like it.  It is well suited for someone who wants to get off the ground quickly; someone who needs to get something done and can worry about the details when they need to.  It&#8217;s not a bible, but it&#8217;s not trying to be, and I think that&#8217;s where it really succeeds.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eddiewelker.com/2008/07/07/review-of-learning-website-development-with-django/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>July 4</title>
		<link>http://www.eddiewelker.com/2008/07/04/july-4/</link>
		<comments>http://www.eddiewelker.com/2008/07/04/july-4/#comments</comments>
		<pubDate>Sat, 05 Jul 2008 00:46:39 +0000</pubDate>
		<dc:creator>Eddie</dc:creator>
				<category><![CDATA[Boston]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[red sox]]></category>
		<category><![CDATA[database api]]></category>
		<category><![CDATA[food network]]></category>
		<category><![CDATA[hot dog eating competition]]></category>
		<category><![CDATA[javascript book]]></category>
		<category><![CDATA[kobayashi]]></category>
		<category><![CDATA[publishers]]></category>
		<category><![CDATA[resturants]]></category>

		<guid isPermaLink="false">http://edwardwelker.com/2008/07/04/july-4/</guid>
		<description><![CDATA[Happy July 4th!  Now, with that out of the way&#8230;
My sister Tania was at the Nathan&#8217;s Hot Dog eating competition today.  She was happy with the result, I was rooting for Kobayashi.  Oh well.  My roommate was rather disgusted by the whole thing.  Me?  I found myself REALLY wanting a hot dog.
Speaking of food&#8230; my [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/vidiot/2636931241/"><img src="http://farm4.static.flickr.com/3079/2636931241_f5f3e3d390_m.jpg" title="Photo by Vidiot. Click image for details." alt="Photo by Vidiot. Click image for details." align="right" border="0" vspace="12" width="240" height="162" hspace="12" /></a>Happy July 4th!  Now, with that out of the way&#8230;</p>
<p>My sister Tania was at the <a href="http://www.nathansfamous.com/PageFetch/getpage.php?pgid=38">Nathan&#8217;s Hot Dog eating competition</a> today.  She was happy with the result, I was rooting for Kobayashi.  Oh well.  My roommate was rather disgusted by the whole thing.  Me?  I found myself <em>REALLY</em> wanting a hot dog.</p>
<p>Speaking of food&#8230; my roommate and I were flipping channels the other day and she insisted on stopping on the food network.  They had a show on about local resturants known only to locals.  The first part was on a place I&#8217;ve passed countless numbers of times, called <a href="http://www.chapspitbeef.com/">Chaps Charcoal Resturant</a>. It looked pretty good, and the prices are good, so I may have to visit soon.</p>
<p>Since I&#8217;m on a food kick at the moment, one more&#8230; this may also soon become <a href="http://bitten.blogs.nytimes.com/2008/07/01/my-new-favorite-thing/">my favorite thing</a>.  Gotta try it.</p>
<p>Elsewhere&#8230;</p>
<p>The <a href="http://www.boston.com/sports/baseball/redsox/articles/2008/07/04/lester_pitches_5_hitter_red_sox_end_5_game_skid/">Sox won, beating the Yankees today</a>, but are still behind the Rays.  If the Rays suffer injuries down the stretch, they&#8217;ll fall.  However, that seems to be a big if.  The Red Sox need to get a number of people back.</p>
<p>And  more locally&#8230;</p>
<p>When I have some free moments, I&#8217;ve been working rebuilding <a href="http://www.gbyo.com">gbyo.com</a> in <a href="http://www.djangoproject.com/">Django</a>.  The programming part isn&#8217;t particularly hard (despite not being familiar with Python&#8230; though, it&#8217;s not unlike other languages), and I kinda like the <a href="http://www.djangoproject.com/documentation/db-api/">database API</a> (It&#8217;s been a while, so I only barely remember <a href="http://wiki.rubyonrails.org/rails/pages/ActiveRecord">ActiveRecord</a>, but I seem to like this more).  The thing I haven&#8217;t grasped yet is overall project structure.  I&#8217;m working on that.</p>
<p>I&#8217;ve bought a <a href="http://www.amazon.com/Iterating-Infusion-Clearer-Objects-Classes/dp/1590595378">number</a> of <a href="http://www.amazon.com/Making-Web-Work-Designing-Applications/dp/0735711968">books</a> <a href="http://www.amazon.com/How-Solve-Heuristics-Zbigniew-Michalewicz/dp/3540660615">recently</a>, and hope to start reading them soon.  Right now, I am reading <a href="http://www.amazon.com/Learning-Website-Development-Technologies-Solutions/dp/1847193358">this</a>, as <a href="http://www.packtpub.com/">the publishers</a> were nice enough to send me a review copy.  Review coming soon.  Additionally, I want to post some <a href="http://realtech.burningbird.net/learning-javascript/basics/javascript-the-good-parts">more formal thoughts</a> about Crockford&#8217;s Javascript book soon. (Note: yes, that first linked book cost me .48 cents, w/o shipping)</p>
<p>I&#8217;m trying to convince people to go on vacation with me.  So far, I haven&#8217;t heard back from anyone.  That will only stall me, it will not deter me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eddiewelker.com/2008/07/04/july-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
