<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Chris Scott</title>
	<atom:link href="http://iamzed.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://iamzed.com</link>
	<description>All the Good Titles Were Taken</description>
	<lastBuildDate>Tue, 24 Apr 2012 15:57:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='iamzed.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Chris Scott</title>
		<link>http://iamzed.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://iamzed.com/osd.xml" title="Chris Scott" />
	<atom:link rel='hub' href='http://iamzed.com/?pushpress=hub'/>
		<item>
		<title>Using WordPress&#8217; wp_enqueue_style() With Conditionals</title>
		<link>http://iamzed.com/2010/01/07/using-wordpress-wp_enqueue_style-with-conditionals/</link>
		<comments>http://iamzed.com/2010/01/07/using-wordpress-wp_enqueue_style-with-conditionals/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 20:51:16 +0000</pubDate>
		<dc:creator>Chris Scott</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://iamzed.com/?p=1329</guid>
		<description><![CDATA[Since I always seem to lose track of the ticket where Ozz explains how to do this, putting it here for posterity. When using wp_enqueue_style you may need to use CSS conditional comments to work around IE bugs. Here&#8217;s the code to add a style for IE 7 named ie7.css located in the root of &#8230; <span class="more-link"><a href="http://iamzed.com/2010/01/07/using-wordpress-wp_enqueue_style-with-conditionals/">Continue reading &#187;</a></span><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1329&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since I always seem to lose track of the <a href="http://core.trac.wordpress.org/ticket/10618#comment:6">ticket where Ozz explains how to do this</a>, putting it here for posterity. When using wp_enqueue_style you may need to use CSS conditional comments to work around IE bugs. Here&#8217;s the code to add a style for IE 7 named ie7.css located in the root of the theme:<br />
<pre class="brush: plain;">wp_enqueue_style(
   'ie7-style',
   get_template_directory_uri() . '/ie7.css'
);
global $wp_styles;
$wp_styles-&amp;gt;add_data( 'ie7-style', 'conditional', 'lte IE 7' );</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iamzed.wordpress.com/1329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iamzed.wordpress.com/1329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iamzed.wordpress.com/1329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iamzed.wordpress.com/1329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iamzed.wordpress.com/1329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iamzed.wordpress.com/1329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iamzed.wordpress.com/1329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iamzed.wordpress.com/1329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iamzed.wordpress.com/1329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iamzed.wordpress.com/1329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iamzed.wordpress.com/1329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iamzed.wordpress.com/1329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iamzed.wordpress.com/1329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iamzed.wordpress.com/1329/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1329&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iamzed.com/2010/01/07/using-wordpress-wp_enqueue_style-with-conditionals/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/e4c892e10b6e0859fea3e1a69c0e6835?s=96&#38;d=retro&#38;r=PG" medium="image">
			<media:title type="html">iamzed</media:title>
		</media:content>
	</item>
		<item>
		<title>I&#039;m Speaking at WordCamp Atlanta!</title>
		<link>http://iamzed.com/2009/12/16/im-speaking-at-wordcamp-atlanta/</link>
		<comments>http://iamzed.com/2009/12/16/im-speaking-at-wordcamp-atlanta/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 16:02:45 +0000</pubDate>
		<dc:creator>Chris Scott</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://iamzed.com/?p=1324</guid>
		<description><![CDATA[Since my talk at WordCamp Orlando on &#8220;You&#8217;re Doing it Wrong&#8221; wasn&#8217;t a total failure was a resounding success, I&#8217;m happy to announce that I&#8217;ll be giving a similar talk at WordCamp Atlanta. If you saw this talk in Orlando and are going to WordCamp Atlanta, don&#8217;t worry. I&#8217;ll have new examples, better jokes, and &#8230; <span class="more-link"><a href="http://iamzed.com/2009/12/16/im-speaking-at-wordcamp-atlanta/">Continue reading &#187;</a></span><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1324&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://atlantawordcamp.com/?utm_source=Speaking&amp;utm_medium=Badges&amp;utm_campaign=speaking"><img class="image-right" title="wcatl_speaking" src="http://atlantawordcamp.com/wp-content/uploads/2009/12/wcatl_speaking.png" alt="I'm speaking at WordCamp Atlanta!" width="160" height="200" /></a>Since my talk at WordCamp Orlando on &#8220;<a href="http://www.slideshare.net/iamzed/youre-doing-it-wrong-wordcamp-orlando">You&#8217;re Doing it Wrong</a>&#8221; <span style="text-decoration:line-through;">wasn&#8217;t a total failure</span> was a resounding success, I&#8217;m happy to announce that I&#8217;ll be giving a similar talk at <a href="http://atlantawordcamp.com/">WordCamp Atlanta</a>. If you saw this talk in Orlando and are going to WordCamp Atlanta, don&#8217;t worry. I&#8217;ll have new examples, better jokes, and a slightly different format for the slides to make them more useful as a reference.</p>
<p>I&#8217;ll cover some common examples seen in plugins, themes, and tutorials that are either the &#8220;wrong&#8221; way to do it, not the &#8220;WordPress way&#8221;, or just obsolete due to bug fixes and feature additions in WordPress. I&#8217;ll also talk about how WordPress coding, upgrading, and community all combine into doing things the &#8220;right&#8221; way.  This is targeted toward intermediate to advanced plugin developers, however, beginning developers may be interested as well.</p>
<p>I talked to quite a few Orlando area people at WordCamp Orlando that were interested in WordCamp Atlanta, so if that&#8217;s you, check out the post on the <a href="http://orlandowordpress.org/?p=36">Orlando WordPress blog</a> if you want to discuss it or need to find someone to carpool/room with.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iamzed.wordpress.com/1324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iamzed.wordpress.com/1324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iamzed.wordpress.com/1324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iamzed.wordpress.com/1324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iamzed.wordpress.com/1324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iamzed.wordpress.com/1324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iamzed.wordpress.com/1324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iamzed.wordpress.com/1324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iamzed.wordpress.com/1324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iamzed.wordpress.com/1324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iamzed.wordpress.com/1324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iamzed.wordpress.com/1324/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iamzed.wordpress.com/1324/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iamzed.wordpress.com/1324/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1324&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iamzed.com/2009/12/16/im-speaking-at-wordcamp-atlanta/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4c892e10b6e0859fea3e1a69c0e6835?s=96&#38;d=retro&#38;r=PG" medium="image">
			<media:title type="html">iamzed</media:title>
		</media:content>

		<media:content url="http://atlantawordcamp.com/wp-content/uploads/2009/12/wcatl_speaking.png" medium="image">
			<media:title type="html">wcatl_speaking</media:title>
		</media:content>
	</item>
		<item>
		<title>My WordCamp Orlando Slides</title>
		<link>http://iamzed.com/2009/12/06/my-wordcamp-orlando-slides/</link>
		<comments>http://iamzed.com/2009/12/06/my-wordcamp-orlando-slides/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 01:20:49 +0000</pubDate>
		<dc:creator>Chris Scott</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://iamzed.com/?p=1319</guid>
		<description><![CDATA[I&#8217;ve posted the slides for my WordCamp Orlando presentation &#8220;You&#8217;re Doing it Wrong&#8221; on Slideshare. Thanks to everyone who attended and for the feedback you gave me.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1319&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve posted the slides for my WordCamp Orlando presentation <a href="http://www.slideshare.net/iamzed/youre-doing-it-wrong-wordcamp-orlando">&#8220;You&#8217;re Doing it Wrong&#8221; on Slideshare</a>.</p>
<p>Thanks to everyone who attended and for the feedback you gave me.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iamzed.wordpress.com/1319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iamzed.wordpress.com/1319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iamzed.wordpress.com/1319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iamzed.wordpress.com/1319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iamzed.wordpress.com/1319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iamzed.wordpress.com/1319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iamzed.wordpress.com/1319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iamzed.wordpress.com/1319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iamzed.wordpress.com/1319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iamzed.wordpress.com/1319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iamzed.wordpress.com/1319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iamzed.wordpress.com/1319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iamzed.wordpress.com/1319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iamzed.wordpress.com/1319/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1319&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iamzed.com/2009/12/06/my-wordcamp-orlando-slides/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4c892e10b6e0859fea3e1a69c0e6835?s=96&#38;d=retro&#38;r=PG" medium="image">
			<media:title type="html">iamzed</media:title>
		</media:content>
	</item>
		<item>
		<title>I&#039;ll Be Speaking at WordCamp Orlando 2009</title>
		<link>http://iamzed.com/2009/11/19/ill-be-speaking-at-wordcamp-orlando-2009/</link>
		<comments>http://iamzed.com/2009/11/19/ill-be-speaking-at-wordcamp-orlando-2009/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 16:02:15 +0000</pubDate>
		<dc:creator>Chris Scott</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://iamzed.com/?p=1313</guid>
		<description><![CDATA[Even if you don&#8217;t think that&#8217;s a good idea, be sure to check out the list of speakers and check out the sessions announced so far. What are you waiting for? Register now. I guarantee it will be the best $15 you spend on a WordCamp in Orlando this year.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1313&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordcamporlando.org/"><img class="image-right" title="WordCamp Orlando" src="http://wordcamporlando.org/wp-content/themes/wco/images/wc-mco-logo-going.png" alt="WordCamp Orlando" width="160" height="180" /></a>Even if you don&#8217;t think that&#8217;s a good idea, be sure to check out the <a href="http://wordcamporlando.org/speakers/">list of speakers</a> and check out the <a href="http://wordcamporlando.org/category/sessions/">sessions</a> announced so far. What are you waiting for? <a href="http://wordcamporlando.org/register/">Register</a> now. I guarantee it will be the best $15 you spend on a WordCamp in Orlando this year.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iamzed.wordpress.com/1313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iamzed.wordpress.com/1313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iamzed.wordpress.com/1313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iamzed.wordpress.com/1313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iamzed.wordpress.com/1313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iamzed.wordpress.com/1313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iamzed.wordpress.com/1313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iamzed.wordpress.com/1313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iamzed.wordpress.com/1313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iamzed.wordpress.com/1313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iamzed.wordpress.com/1313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iamzed.wordpress.com/1313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iamzed.wordpress.com/1313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iamzed.wordpress.com/1313/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1313&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iamzed.com/2009/11/19/ill-be-speaking-at-wordcamp-orlando-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4c892e10b6e0859fea3e1a69c0e6835?s=96&#38;d=retro&#38;r=PG" medium="image">
			<media:title type="html">iamzed</media:title>
		</media:content>

		<media:content url="http://wordcamporlando.org/wp-content/themes/wco/images/wc-mco-logo-going.png" medium="image">
			<media:title type="html">WordCamp Orlando</media:title>
		</media:content>
	</item>
		<item>
		<title>Save the Date: WordCamp Orlando on December 5, 2009</title>
		<link>http://iamzed.com/2009/06/11/save-the-date-wordcamp-orlando-on-december-5-2009/</link>
		<comments>http://iamzed.com/2009/06/11/save-the-date-wordcamp-orlando-on-december-5-2009/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 16:07:32 +0000</pubDate>
		<dc:creator>Chris Scott</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://iamzed.com/?p=1309</guid>
		<description><![CDATA[Official site at http://wordcamporlando.org/, Twitter @wordcamporlando, and more info here. I&#8217;ll second everything Nick says in that post. I&#8217;m definitely looking forward to this.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1309&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordcamporlando.org/"><img src="http://farm4.static.flickr.com/3664/3617220242_cce9c89fb7_o.png" alt="WordCamp Orlando" width="659" height="490" border="0" /></a></p>
<p>Official site at <a href="http://wordcamporlando.org/">http://wordcamporlando.org/</a>, Twitter <a href="http://twitter.com/wordcamporlando">@wordcamporlando</a>, and <a href="http://cnpstudio.com/blog/2009/06/11/wordcamp-orlando-coming-december-5-2009/">more info here</a>. I&#8217;ll second everything Nick says in that post. I&#8217;m definitely looking forward to this.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iamzed.wordpress.com/1309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iamzed.wordpress.com/1309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iamzed.wordpress.com/1309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iamzed.wordpress.com/1309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iamzed.wordpress.com/1309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iamzed.wordpress.com/1309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iamzed.wordpress.com/1309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iamzed.wordpress.com/1309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iamzed.wordpress.com/1309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iamzed.wordpress.com/1309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iamzed.wordpress.com/1309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iamzed.wordpress.com/1309/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iamzed.wordpress.com/1309/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iamzed.wordpress.com/1309/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1309&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iamzed.com/2009/06/11/save-the-date-wordcamp-orlando-on-december-5-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4c892e10b6e0859fea3e1a69c0e6835?s=96&#38;d=retro&#38;r=PG" medium="image">
			<media:title type="html">iamzed</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3664/3617220242_cce9c89fb7_o.png" medium="image">
			<media:title type="html">WordCamp Orlando</media:title>
		</media:content>
	</item>
		<item>
		<title>A Primer on virtualenv</title>
		<link>http://iamzed.com/2009/05/07/a-primer-on-virtualenv/</link>
		<comments>http://iamzed.com/2009/05/07/a-primer-on-virtualenv/#comments</comments>
		<pubDate>Thu, 07 May 2009 20:11:37 +0000</pubDate>
		<dc:creator>Chris Scott</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://iamzed.com/?p=1293</guid>
		<description><![CDATA[What is virtualenv and Why Should You Use It? Put simply (and copied from the project page), virtualenv is a tool to create isolated Python environments. Why is this good? You can create a new Python environment to run a Python/Django/whatever app and install all package dependencies into the virtualenv without affecting your system&#8217;s site-packages. &#8230; <span class="more-link"><a href="http://iamzed.com/2009/05/07/a-primer-on-virtualenv/">Continue reading &#187;</a></span><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1293&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>What is virtualenv and Why Should You Use It?</h2>
<p>Put simply (and copied from the project page), <a href="http://pypi.python.org/pypi/virtualenv">virtualenv</a> is a tool to create isolated Python environments. Why is this good? You can create a new Python environment to run a Python/Django/whatever app and install all package dependencies into the virtualenv without affecting your system&#8217;s site-packages. Need to upgrade a package to see how it affects your app? Create a new virtualenv, install/copy your app into it, run your tests, and delete it when you are done. Just like git makes branching inexpensive and easy, virtualenv makes creating and managing new Python environments inexpensive and easy.</p>
<h2>Show Me Some Code!</h2>
<p>First, you need to install virtualenv. The typical way to install is from PyPi using <tt>easy_install</tt>. You can also use <tt>pip</tt> or install from source. We&#8217;ll use <tt>easy_install</tt> since it is&#8230;easy:</p>
<pre>$ sudo easy_install virtualenv
Password:

Searching for virtualenv
Best match: virtualenv 1.3.3
Downloading http://pypi.python.org/packages/2.5/v/virtualenv/virtualenv-1.3.3-py2.5.egg#md5=fae350c941cd9eadf5e9a407c37a2e03Processing virtualenv-1.3.3-py2.5.egg
Adding virtualenv 1.3.3 to easy-install.pth file
Installing virtualenv script to /usr/local/bin

Using /Library/Python/2.5/site-packages/virtualenv-1.3.3-py2.5.egg
Processing dependencies for virtualenv
Finished processing dependencies for virtualenv</pre>
<p>Now, you&#8217;re ready to create your virtualenv. BUT FIRST&#8230;you have a decision to make. Do you want this virtualenv to use packages from your system site-packages on install them in the virtualenv&#8217;s site-packages? By default, virtualenv will symlink to your system&#8217;s site-packages if you install a package in the virtualenv that is already installed on your system. If you want a totally (well, as much as is possible) isolated virtualenv, you&#8217;ll want to do the latter. To do this, you pass in the &#8211;no-site-packages switch when creating your virtualenv.</p>
<p>So, let&#8217;s create a virtualenv named for the project we are working on (mycoolproject) and tell it not to use the system site-packages but keep it&#8217;s own copy:</p>
<pre>$ pwd
/Users/chris/Documents/clients

$ virtualenv --no-site-packages mycoolproject
New python executable in mycoolproject/bin/python
Installing setuptools............done.

$ ls mycoolproject
bin     include lib</pre>
<p>I told virtualenv to not use the system <tt>site-packages</tt> and to create the virtualenv in a directory named <tt>mycoolproject</tt>. This directory didn&#8217;t exist so it created it, however, if it did exist virtualenv would install it&#8217;s files within it. virtualenv created three directories to use for running Python and installing packages into the virtualenv.</p>
<p>So, we have a new virtualenv, now what? Activate your virtualenv. To do this, change to the virtualenv directory you just created and source the activation script from the <tt>bin</tt> directory in your virtualenv:</p>
<pre>$ cd mycoolproject
chris@chris.local [~/Documents/clients/mycoolproject]
$ source bin/activate
(mycoolproject)chris@chris.local [~/Documents/clients/mycoolproject]
$</pre>
<p>I&#8217;ve included my full command prompt here so you can see that when you activate a virtualenv, it modifies your current prompt to prepend the name of the virtualenv in parentheses so that you know at a glance you have it active.</p>
<p>So, what happened here? Other than the prompt change, the main changes the activate script makes are:</p>
<pre>VIRTUAL_ENV="/Users/chris/Documents/clients/mycoolproject"
export VIRTUAL_ENV

_OLD_VIRTUAL_PATH="$PATH"
PATH="$VIRTUAL_ENV/bin:$PATH"
export PATH</pre>
<p>This sets up an environment variable with the virtualenv path and also modifies your path so the <tt>bin</tt> directory in the virtualenv is first. This is important since running python from the command line when your virtualenv is active runs it from there instead of your system path. This means through the magic of the Python <a href="http://docs.python.org/library/site.html">site module</a> the <tt>site-packages</tt> in your virtualenv will be in <tt>sys.path</tt> and not your system&#8217;s <tt>site-packages</tt>.</p>
<h2>Installing Packages in a virtualenv</h2>
<p>So, this is where the fun part starts. If you look at the bin directory in your virtualenv, you&#8217;ll see easy_install which has been modified to put eggs and packages in the virtualenv&#8217;s site-packages directory. So, once you activate your virtualenv installing a package in it is as easy as always:</p>
<pre>$ easy_install ipython</pre>
<p>Notice that I didn&#8217;t have to <tt>sudo</tt> this time since the files will all be installed in the virtualenv&#8217;s  <tt>lib/python2.5/site-packages</tt> directory which was created as my user account so I have the appropriate permissions.</p>
<p>You can also use <a href="http://pypi.python.org/pypi/pip">pip</a> to install packages in a virtualenv since it is virtualenv-aware. This is very handy since you can easily create a pip requirements file and use that to easily install all the various packages the software you are running in your virtualenv will need. Check out the <a href="http://pinaxproject.com/docs/dev/install.html#development-instructions">Pinax project&#8217;s installation docs</a> for an example of this.</p>
<h2>Tips for Working With virtualenv</h2>
<ul>
<li>Use the <a href="http://www.doughellmann.com/projects/virtualenvwrapper/">virtualenvwrapper</a> script to make working with and changing to/from multiple virtualenvs easy.</li>
<li>For Django, after you install Django in your virtualenv, copy the <tt>django-admin.py</tt> from the Django package to the <tt>bin</tt> directory of your virtualenv so that you can still type <tt>django-admin.py startproject</tt> without specifying the full path to <tt>django-admin.py</tt>.</li>
<li>If you use the <tt>--no-site-packages</tt> option you are starting with a bare Python install and will need to install all the things you have forgotten about since the first time you set your system up like PIL, ipython, ipdb, readline, etc. This is where a <tt>pip</tt> requirements file is a very good thing.</li>
<li>If you are on OS X installing PIL from <tt>pip</tt> or <tt>easy_install</tt> may not work. To get around this just symlink the <tt>PIL</tt> directory from <tt>/Library/Python/2.5/site-packages</tt> to <tt>lib/python2.5/site-packages</tt> in your virtualenv.</li>
</ul>
<h2>Questions, Corrections, Tips?</h2>
<p>I&#8217;m not a virtualenv expert, I just play one on the internet. If you see anything wrong with what I&#8217;ve said or have any suggestions or tips, please let me know in the comments or email chris@ this domain.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iamzed.wordpress.com/1293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iamzed.wordpress.com/1293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iamzed.wordpress.com/1293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iamzed.wordpress.com/1293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iamzed.wordpress.com/1293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iamzed.wordpress.com/1293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iamzed.wordpress.com/1293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iamzed.wordpress.com/1293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iamzed.wordpress.com/1293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iamzed.wordpress.com/1293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iamzed.wordpress.com/1293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iamzed.wordpress.com/1293/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iamzed.wordpress.com/1293/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iamzed.wordpress.com/1293/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1293&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iamzed.com/2009/05/07/a-primer-on-virtualenv/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4c892e10b6e0859fea3e1a69c0e6835?s=96&#38;d=retro&#38;r=PG" medium="image">
			<media:title type="html">iamzed</media:title>
		</media:content>
	</item>
		<item>
		<title>Word Movement in iTerm on OS X</title>
		<link>http://iamzed.com/2009/04/15/word-movement-in-iterm-on-os-x/</link>
		<comments>http://iamzed.com/2009/04/15/word-movement-in-iterm-on-os-x/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 12:54:33 +0000</pubDate>
		<dc:creator>Chris Scott</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://iamzed.com/?p=1286</guid>
		<description><![CDATA[Prompted by a question from Tim Rosenblatt and answer from Matt Williams about how to move forward and backward by words in OS X Terminal.app, I wanted to see how to do this in iTerm. Referencing the article Matt sent made it easy. In iTerm, choose Manage Profiles from the Bookmarks menu. Expand the Keyboard &#8230; <span class="more-link"><a href="http://iamzed.com/2009/04/15/word-movement-in-iterm-on-os-x/">Continue reading &#187;</a></span><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1286&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Prompted by a <a href="http://twitter.com/timrosenblatt/status/1524663303">question</a> from <a href="http://www.timrosenblatt.com/">Tim Rosenblatt</a> and <a href="http://twitter.com/timrosenblatt/status/1524663303">answer</a> from <a href="http://mwilliams.mp/">Matt Williams</a> about how to move forward and backward by words in OS X Terminal.app, I wanted to see how to do this in <a href="http://iterm.sourceforge.net/">iTerm</a>. Referencing the <a href="http://fabiokung.com/2008/04/15/word-movement-in-os-x-leopard-terminalapp/">article</a> Matt sent made it easy.</p>
<p>In iTerm, choose <tt>Manage Profiles</tt> from the <tt>Bookmarks</tt> menu. Expand the <tt>Keyboard Profiles</tt> tree, choose the <tt>Global</tt> profile and add a new mapping. I want to use <tt>Option+Left Arrow</tt> for back and <tt>Option+Right Arrow</tt> for forward. Here&#8217;s what my settings look like for back:</p>
<p><img class="image-center" src="http://farm4.static.flickr.com/3542/3444722220_1e58bc5d6f_o.png" border="0" alt="iTerm Keyboard Mapping" width="296" height="274" /></p>
<p>Since these are Global, I had to choose the <tt>High interception priority</tt> option to get them to work. Do the same thing for forward, but use <tt>f</tt> for the escape sequence to send.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iamzed.wordpress.com/1286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iamzed.wordpress.com/1286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iamzed.wordpress.com/1286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iamzed.wordpress.com/1286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iamzed.wordpress.com/1286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iamzed.wordpress.com/1286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iamzed.wordpress.com/1286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iamzed.wordpress.com/1286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iamzed.wordpress.com/1286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iamzed.wordpress.com/1286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iamzed.wordpress.com/1286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iamzed.wordpress.com/1286/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iamzed.wordpress.com/1286/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iamzed.wordpress.com/1286/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1286&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iamzed.com/2009/04/15/word-movement-in-iterm-on-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4c892e10b6e0859fea3e1a69c0e6835?s=96&#38;d=retro&#38;r=PG" medium="image">
			<media:title type="html">iamzed</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3542/3444722220_1e58bc5d6f_o.png" medium="image">
			<media:title type="html">iTerm Keyboard Mapping</media:title>
		</media:content>
	</item>
		<item>
		<title>Local to External Django Docs Bookmarklet</title>
		<link>http://iamzed.com/2009/04/07/local-to-external-django-docs-bookmarklet/</link>
		<comments>http://iamzed.com/2009/04/07/local-to-external-django-docs-bookmarklet/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 12:53:11 +0000</pubDate>
		<dc:creator>Chris Scott</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://iamzed.com/?p=1283</guid>
		<description><![CDATA[As I&#8217;m learning Django, I&#8217;ve found it helpful to have a local copy of the Django docs to refer to. This is quicker than going to the Django docs site and also helps when I don&#8217;t have a connection. The only drawback to this is that when I find something I want to share with &#8230; <span class="more-link"><a href="http://iamzed.com/2009/04/07/local-to-external-django-docs-bookmarklet/">Continue reading &#187;</a></span><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1283&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;m learning Django, I&#8217;ve found it helpful to have a local copy of the Django docs to refer to. This is quicker than going to the Django docs site and also helps when I don&#8217;t have a connection. The only drawback to this is that when I find something I want to share with someone I have to go find it again in the online docs and send them a link.</p>
<p>I finally got tired of this and created a simple bookmarklet that will take me from my local copy to the same place in the online docs. Here&#8217;s it is: <a title="Django External Docs" href="//docs.djangoproject.com/en/dev/$1/$3'));">Django Docs Link</a>. Just drag that to your browser&#8217;s toolbar. When you are browsing your local Django docs, click on it to be taken to the same page online.</p>
<p>If you find any problems with this or have any suggestions, please let me know in the comments or email me at chris@ this domain.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iamzed.wordpress.com/1283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iamzed.wordpress.com/1283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iamzed.wordpress.com/1283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iamzed.wordpress.com/1283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iamzed.wordpress.com/1283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iamzed.wordpress.com/1283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iamzed.wordpress.com/1283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iamzed.wordpress.com/1283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iamzed.wordpress.com/1283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iamzed.wordpress.com/1283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iamzed.wordpress.com/1283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iamzed.wordpress.com/1283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iamzed.wordpress.com/1283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iamzed.wordpress.com/1283/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1283&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iamzed.com/2009/04/07/local-to-external-django-docs-bookmarklet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4c892e10b6e0859fea3e1a69c0e6835?s=96&#38;d=retro&#38;r=PG" medium="image">
			<media:title type="html">iamzed</media:title>
		</media:content>
	</item>
		<item>
		<title>Rex</title>
		<link>http://iamzed.com/2008/12/23/rex-2/</link>
		<comments>http://iamzed.com/2008/12/23/rex-2/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 17:21:22 +0000</pubDate>
		<dc:creator>Chris Scott</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://iamzed.com/?p=1280</guid>
		<description><![CDATA[We&#8217;ll miss you, buddy.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1280&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm4.static.flickr.com/3214/2647610466_c5ac6ee9c5.jpg" border="0" alt="Rex" width="500" height="363" /><br />
We&#8217;ll miss you, buddy.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iamzed.wordpress.com/1280/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iamzed.wordpress.com/1280/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iamzed.wordpress.com/1280/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iamzed.wordpress.com/1280/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iamzed.wordpress.com/1280/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iamzed.wordpress.com/1280/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iamzed.wordpress.com/1280/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iamzed.wordpress.com/1280/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iamzed.wordpress.com/1280/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iamzed.wordpress.com/1280/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iamzed.wordpress.com/1280/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iamzed.wordpress.com/1280/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iamzed.wordpress.com/1280/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iamzed.wordpress.com/1280/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1280&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iamzed.com/2008/12/23/rex-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4c892e10b6e0859fea3e1a69c0e6835?s=96&#38;d=retro&#38;r=PG" medium="image">
			<media:title type="html">iamzed</media:title>
		</media:content>

		<media:content url="http://farm4.static.flickr.com/3214/2647610466_c5ac6ee9c5.jpg" medium="image">
			<media:title type="html">Rex</media:title>
		</media:content>
	</item>
		<item>
		<title>Customizing Django&#039;s Admin Templates and Media When Using the Built-In Development Web Server</title>
		<link>http://iamzed.com/2008/12/11/customizing-django-admin-templates-and-media/</link>
		<comments>http://iamzed.com/2008/12/11/customizing-django-admin-templates-and-media/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 19:12:17 +0000</pubDate>
		<dc:creator>Chris Scott</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://iamzed.com/?p=1266</guid>
		<description><![CDATA[At work today, Sean was playing around with creating a Django app and wanted to use the django-grappelli project to get a cool look for Django’s admin. I warned him against using the instructions included in the project since if you are using Django from an svn checkout then it will break any future svn &#8230; <span class="more-link"><a href="http://iamzed.com/2008/12/11/customizing-django-admin-templates-and-media/">Continue reading &#187;</a></span><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1266&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At work today, <a href="http://twitter.com/seanosh">Sean</a> was playing around with creating a Django app and wanted to use the <a href="http://code.google.com/p/django-grappelli/">django-grappelli</a> project to get a cool look for Django’s admin.  I warned him against using the instructions included in the project since if you are using Django from an svn checkout then it will break any future svn updates with an error message something like this:</p>
<p><code>working copy does not exist in repository</code></p>
<p>So, we started working on a way around this for a local dev environment.  We knew we could override the admin templates easily but hadn’t really seen anything about how to override the admin media.  Between the two of us, we got it working and figured putting it into writing for future reference would be a good thing.</p>
<h1 id="step_1">Step 1</h1>
<p>First, check out the django-grappelli project. I’m putting mine in the <code>src</code> directory in my home directory:</p>
<pre>$ cd ~/src
$ pwd
/Users/chris/src
$ svn checkout http://django-grappelli.googlecode.com/svn/trunk/ django-grappelli</pre>
<h1 id="step_2">Step 2</h1>
<p>In your project’s <code>settings.py</code> add a template directory to the templates directory in the django-grappelli directory you created above:</p>
<pre>TEMPLATE_DIRS = (
'/Users/chris/src/django-grappelli/templates',
)</pre>
<p>Also in <code>settings.py</code> change the <code>ADMIN_MEDIA_PREFIX</code> to use the full URL to the server that <code>manage.py</code>’s <code>runserver</code> command will create and append that with a path you want to use. This doesn’t need to relate to any file system path since you’re just going to use it in a urlconf with a static view.</p>
<pre>ADMIN_MEDIA_PREFIX = 'http://127.0.0.1:8000/media/admin/'</pre>
<h1 id="step_3">Step 3</h1>
<p>In your project’s <code>urls.py</code> comment out the lines to enable the admin and add a urlpattern to serve the admin media using the web path you used above from the file system path of the media directory in the django-grappelli project you created in the first step.</p>
<p>In my case, I’m using <code>http://127.0.0.1:8000/media/admin/</code> as my <code>ADMIN_MEDIA_PREFIX</code> which is a web path of <code>/media/admin/</code>.  Since Django strips off the initial slash, your regex to match it would be <code>r'^media/admin/(?P&lt;path&gt;.*)$'</code>. You’ll send these requests to the django static serve view and pass in the <code>document_root</code> which is the file system path to django-grappelli’s <code>media</code> directory.  Your <code>urls.py</code> should now look something like this:</p>
<pre>from django.conf.urls.defaults import *

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns(”,
(r'^admin/(.*)', admin.site.root),
(r'^media/admin/(?P&lt;path&gt;.*)$', 'django.views.static.serve', {'document_root': '/Users/chris/src/django-grappelli/media'}),
)</pre>
<h1 id="finally">Finally</h1>
<p>Now, just do <code>./manage.py runserver</code> in your project directory and browse to <code>http://127.0.0.1:8000/admin/</code> and you should see Grappelli’s sweet styles looking back at you.</p>
<h1 id="notes">Notes</h1>
<p>The key to making this work is using a full URL instead of an absolute or relative URL for your <code>ADMIN_MEDIA_PREFIX</code>. This allows Django to use your normal urlconf to serve up the media with the static serve view.</p>
<p>This is designed to work in a local dev environment using Django’s built-in server.  Don’t use this in production—serve your media using nginx, Apache, etc.</p>
<p>There is probably a better way to do this and suggestions are welcome.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/iamzed.wordpress.com/1266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/iamzed.wordpress.com/1266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/iamzed.wordpress.com/1266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/iamzed.wordpress.com/1266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/iamzed.wordpress.com/1266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/iamzed.wordpress.com/1266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/iamzed.wordpress.com/1266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/iamzed.wordpress.com/1266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/iamzed.wordpress.com/1266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/iamzed.wordpress.com/1266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/iamzed.wordpress.com/1266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/iamzed.wordpress.com/1266/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/iamzed.wordpress.com/1266/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/iamzed.wordpress.com/1266/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=iamzed.com&amp;blog=9153131&amp;post=1266&amp;subd=iamzed&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://iamzed.com/2008/12/11/customizing-django-admin-templates-and-media/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4c892e10b6e0859fea3e1a69c0e6835?s=96&#38;d=retro&#38;r=PG" medium="image">
			<media:title type="html">iamzed</media:title>
		</media:content>
	</item>
	</channel>
</rss>
