<?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>#if debug &#187; development</title>
	<atom:link href="http://ifdebug.com/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://ifdebug.com</link>
	<description>Technical thoughts of a coffee addicted developer</description>
	<lastBuildDate>Fri, 16 Sep 2011 13:18:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Change The Django Source Directory With A .pth File</title>
		<link>http://ifdebug.com/change-the-django-source-directory-with-a-pth-file/</link>
		<comments>http://ifdebug.com/change-the-django-source-directory-with-a-pth-file/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 12:57:52 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[development environment]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://ifdebug.com/articles/change-the-django-source-directory-with-a-pth-file/</guid>
		<description><![CDATA[John DeRosa recently wrote about using junctions (the Windows version of a symbolic link within Unix) to change the Django source directory. While that solution clearly works, I got the impression it seemed like a lot of hard work and &#8230; <a href="http://ifdebug.com/change-the-django-source-directory-with-a-pth-file/">Continue reading <span class="meta-nav">&#8594;</span></a>


No related posts.]]></description>
			<content:encoded><![CDATA[<p>John DeRosa recently <a href="http://seeknuance.com/2008/01/29/multiple-django-development-versions-on-windows/">wrote</a> about using junctions (the Windows version of a symbolic link within Unix) to change the <a href="http://www.djangoproject.com">Django</a> source directory. While that solution clearly works, I got the impression it seemed like a lot of hard work and John asked if there was a better way of handling that scenario.</p>
<p>If you&#8217;re wondering why a developer might want different versions of Django installed &#8211; it&#8217;s common if you need to upgrade an existing site from one version to another or if you offer a distributed application that is meant to work on the latest and also older versions of Django.</p>
<p>Under normal circumstances, developers place a copy of the Django source code underneath their <code>${install_path}\Lib\site-packages\</code> folder. While this works, it isn&#8217;t particularly convenient if you want or need to switch between the different versions. Under a unix based system, the common way of switching between the different versions is using a symbolic link; so you&#8217;d change the symbolic link from pointing from version A to version B. Unfortunately, in a Windows environment the concept of a symbolic link either doesn&#8217;t exist or isn&#8217;t common knowledge. As a by product, the average developer is only left with the option of copy and pasting the Django source code around in their file system or renaming folders &#8211; not particular convenient.</p>
<p>Fortunately, a little known feature of Python is that it supports special files with a <code>.pth</code> file extension. The <code>.pth</code> files or path files, are using by the <a href="http://docs.python.org/lib/module-site.html">site module</a> (found under <code>${install_path}\Lib\</code>) when the interpreters environment is initialised. The <code>.pth</code> files are standard text files, which contain one path per line, which when loaded are added into the <code>sys.path</code> collection.</p>
<p>A quick run down, place a <code>django.pth</code> file under <code>${install_path}\Lib\site-packages\</code>, with a single line pointing towards your preferred Django source code version. When you need to change the version of Django you&#8217;re developing against &#8211; change the path within the file. Remember that if you have a Python interpreter open at the time, you&#8217;ll need to restart it and likewise if you&#8217;re running Django via something like Apache.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://ifdebug.com/change-the-django-source-directory-with-a-pth-file/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installing Django On Windows</title>
		<link>http://ifdebug.com/installing-django-windows/</link>
		<comments>http://ifdebug.com/installing-django-windows/#comments</comments>
		<pubDate>Thu, 07 Feb 2008 13:19:45 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[development environment]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://ifdebug.com/articles/installing-django-windows/</guid>
		<description><![CDATA[Ever needed to install Django in a Microsoft Windows environment, here is a quick start guide to make that happen: Read through the official Django installation documentation, it might just save you a world of hut down the road. Download &#8230; <a href="http://ifdebug.com/installing-django-windows/">Continue reading <span class="meta-nav">&#8594;</span></a>


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Ever needed to install <a href="http://www.djangoproject.com">Django</a> in a Microsoft Windows environment, here is a quick start guide to make that happen:</p>
<ol>
<li>Read through the official <a href="http://www.djangoproject.com/documentation/install/">Django installation documentation</a>, it might just save you a world of hut down the road.</li>
<li><a href="http://www.python.org/download/">Download Python</a> for your version of Windows.</li>
<li>Install Python, my preference here is to put it into the Program Files folder under a folder named Python&lt;Version&gt;</li>
<li>Add your chosen Python installation path into your Windows path environment variable. This is an optional step, however it allows you to just type <code>python</code> in the command line and have it fire up the Python interpreter. An easy way of adding it is going into Control Panel, System and into the Environment Variables section.</li>
<li><a href="http://www.djangoproject.com/download/">Download Django</a>, you can either download a compressed file or if you&#8217;re comfortable with using version control &#8211; check it out from the Django Subversion repository.</li>
<li>Create a folder named <code>django</code> under your &lt;Python installation directory&gt;\Lib\site-packages\ folder. Using my example above that would have been C:\Program Files\Python25\Lib\site-packages\.</li>
<li>If you chose to download the compressed file, open it and extract the contents of the django folder into your newly created folder. If you&#8217;d prefer to check it out from Subversion, the normal check out points are <a href="http://code.djangoproject.com/svn/django/trunk/">http://code.djangoproject.com/svn/django/trunk/</a> for the latest development copy or a named release which you&#8217;ll find under <a href="http://code.djangoproject.com/svn/django/tags/releases/">http://code.djangoproject.com/svn/django/tags/releases/</a>.</li>
</ol>
<p>Done, you now have a working Django installation on Windows.</p>
<p>At this point, it&#8217;d be pertinent to confirm that everything is working properly, which you can do by following the first <a href="http://www.djangoproject.com/documentation/tutorial01/">Django tutorial</a>. The tutorial will make mention of <code>django-admin.py</code>, which is a utility which offers some basic functionality to get you off the ground. The file is located in the bin folder under your Django installation directory. When you need to use it, you can either type in the full path to it or simply add that file path into your environment variables as well.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://ifdebug.com/installing-django-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

