<?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: Keep your Django Applications in a Subfolder</title>
	<atom:link href="http://solutions.treypiepmeier.com/2009/01/08/keep-your-django-applications-in-a-subfolder/feed/" rel="self" type="application/rss+xml" />
	<link>http://solutions.treypiepmeier.com/2009/01/08/keep-your-django-applications-in-a-subfolder/</link>
	<description>So I don&#039;t have to figure things out more than once.</description>
	<lastBuildDate>Fri, 26 Feb 2010 08:16:55 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Olivier</title>
		<link>http://solutions.treypiepmeier.com/2009/01/08/keep-your-django-applications-in-a-subfolder/comment-page-1/#comment-55890</link>
		<dc:creator>Olivier</dc:creator>
		<pubDate>Wed, 25 Nov 2009 17:45:01 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=217#comment-55890</guid>
		<description>&lt;p&gt;I think it&#039;s a good solution, except that I would put that code inside the &lt;code&gt;settings&lt;/code&gt; file instead.&lt;/p&gt;

&lt;p&gt;I don&#039;t understand the comment of James Bennett above. The python search path is designed to be changed, and that it precisely what django does. If django does it, why wouldn&#039;t you?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I think it&#8217;s a good solution, except that I would put that code inside the <code>settings</code> file instead.</p>

<p>I don&#8217;t understand the comment of James Bennett above. The python search path is designed to be changed, and that it precisely what django does. If django does it, why wouldn&#8217;t you?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Trey</title>
		<link>http://solutions.treypiepmeier.com/2009/01/08/keep-your-django-applications-in-a-subfolder/comment-page-1/#comment-32001</link>
		<dc:creator>Trey</dc:creator>
		<pubDate>Fri, 30 Jan 2009 18:43:16 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=217#comment-32001</guid>
		<description>&lt;p&gt;@Tarak - That&#039;s what I do when I&#039;m installing 3rd party apps.  I have something like &lt;code&gt;~/source/django_apps/&lt;/code&gt; where I keep them and symlink to my &lt;code&gt;site-packages&lt;/code&gt;.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Tarak &#8211; That&#8217;s what I do when I&#8217;m installing 3rd party apps.  I have something like <code>~/source/django_apps/</code> where I keep them and symlink to my <code>site-packages</code>.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Tarak Blah</title>
		<link>http://solutions.treypiepmeier.com/2009/01/08/keep-your-django-applications-in-a-subfolder/comment-page-1/#comment-32000</link>
		<dc:creator>Tarak Blah</dc:creator>
		<pubDate>Fri, 30 Jan 2009 18:39:42 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=217#comment-32000</guid>
		<description>&lt;p&gt;What about putting all symlinks to your django-apps in a directory like&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/usr/local/lib/python2.5/site-packages/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This might be depending on the unix-distro that&#039;s used. This directory was empty on my system. This way I don&#039;t have to put the links in the primary system-wide $PYTHONPATH. And with a simple direcory listing I get all activated apps...&lt;/p&gt;

&lt;p&gt;I&#039;m using Debian Testing and found this while reading /etc/python2.5/site.py - printing sys.path showed the directory already.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>What about putting all symlinks to your django-apps in a directory like</p>

<pre><code>/usr/local/lib/python2.5/site-packages/
</code></pre>

<p>This might be depending on the unix-distro that&#8217;s used. This directory was empty on my system. This way I don&#8217;t have to put the links in the primary system-wide $PYTHONPATH. And with a simple direcory listing I get all activated apps&#8230;</p>

<p>I&#8217;m using Debian Testing and found this while reading /etc/python2.5/site.py &#8211; printing sys.path showed the directory already.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ask Solem Hoel</title>
		<link>http://solutions.treypiepmeier.com/2009/01/08/keep-your-django-applications-in-a-subfolder/comment-page-1/#comment-27850</link>
		<dc:creator>Ask Solem Hoel</dc:creator>
		<pubDate>Fri, 09 Jan 2009 15:05:54 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=217#comment-27850</guid>
		<description>&lt;p&gt;The mystery is why people didn&#039;t create reusable apps in the first place, so instead of creating the hacks, how about making the non-reusable apps reusable and submit patches/fork them?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>The mystery is why people didn&#8217;t create reusable apps in the first place, so instead of creating the hacks, how about making the non-reusable apps reusable and submit patches/fork them?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Eivind Uggedal</title>
		<link>http://solutions.treypiepmeier.com/2009/01/08/keep-your-django-applications-in-a-subfolder/comment-page-1/#comment-27839</link>
		<dc:creator>Eivind Uggedal</dc:creator>
		<pubDate>Thu, 08 Jan 2009 21:34:01 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=217#comment-27839</guid>
		<description>&lt;p&gt;I love having all my non-reusable apps right in the root of my project dir. I then do&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:tabe myapp/views.py
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;instead of&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;:tabe apps/myapp/views.py
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;in vim.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I love having all my non-reusable apps right in the root of my project dir. I then do</p>

<pre><code>:tabe myapp/views.py
</code></pre>

<p>instead of</p>

<pre><code>:tabe apps/myapp/views.py
</code></pre>

<p>in vim.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Trey</title>
		<link>http://solutions.treypiepmeier.com/2009/01/08/keep-your-django-applications-in-a-subfolder/comment-page-1/#comment-27833</link>
		<dc:creator>Trey</dc:creator>
		<pubDate>Thu, 08 Jan 2009 19:09:51 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=217#comment-27833</guid>
		<description>&lt;p&gt;The problem I&#039;m trying to solve is just an aesthetic one for the organization of a project with multiple apps.&lt;/p&gt;

&lt;p&gt;This is something that kind of bugs me about Django in general--there&#039;s not an accepted default, so people just start doing it in different ways.  I know apps are just Python modules and can live anywhere in your Python path, but it just seems messy to me to have apps in the same place as &lt;code&gt;templates/&lt;/code&gt; and &lt;code&gt;settings.py&lt;/code&gt; and all the other things in the root of your project (at least if there are several apps in the project).&lt;/p&gt;

&lt;p&gt;I do appreciate being able to put them outside of the project entirely for reusable apps like django-tagging that will be used on more than one project.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>The problem I&#8217;m trying to solve is just an aesthetic one for the organization of a project with multiple apps.</p>

<p>This is something that kind of bugs me about Django in general&#8211;there&#8217;s not an accepted default, so people just start doing it in different ways.  I know apps are just Python modules and can live anywhere in your Python path, but it just seems messy to me to have apps in the same place as <code>templates/</code> and <code>settings.py</code> and all the other things in the root of your project (at least if there are several apps in the project).</p>

<p>I do appreciate being able to put them outside of the project entirely for reusable apps like django-tagging that will be used on more than one project.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: bill</title>
		<link>http://solutions.treypiepmeier.com/2009/01/08/keep-your-django-applications-in-a-subfolder/comment-page-1/#comment-27832</link>
		<dc:creator>bill</dc:creator>
		<pubDate>Thu, 08 Jan 2009 18:41:24 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=217#comment-27832</guid>
		<description>&lt;p&gt;We put all of our apps in a folder called apps/ and have never had to do anything special besides referencing the new folder in import statements. What problem are you trying to solve?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>We put all of our apps in a folder called apps/ and have never had to do anything special besides referencing the new folder in import statements. What problem are you trying to solve?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: James Bennett</title>
		<link>http://solutions.treypiepmeier.com/2009/01/08/keep-your-django-applications-in-a-subfolder/comment-page-1/#comment-27831</link>
		<dc:creator>James Bennett</dc:creator>
		<pubDate>Thu, 08 Jan 2009 18:06:39 +0000</pubDate>
		<guid isPermaLink="false">http://solutions.treypiepmeier.com/?p=217#comment-27831</guid>
		<description>&lt;blockquote&gt;
  &lt;p&gt;Now to figure out what to do in
  production…&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A Django deployment which has to manually futz with &lt;code&gt;sys.path&lt;/code&gt; from Python code just to find its own apps is a Django deployment that shouldn&#039;t happen; typically it points to conceptual problems further up the chain (and the fact that you&#039;ve copy/pasted bits from Brian&#039;s code without seeing what you&#039;re actually using is a further indicator of such).&lt;/p&gt;

&lt;p&gt;The Python path really isn&#039;t that tough a thing to master, and once you know how it works, you just put application modules on the Python path. Not in an &quot;apps&quot; folder, not in the bizarre structure Pinax uses (and which I&#039;ve complained about endlessly to the Pinax folks), just right there on your Python path where you know you can import them without any trouble.&lt;/p&gt;

&lt;p&gt;For truly complex situations (and Pinax doesn&#039;t even come close to complex enough to need this), use &lt;code&gt;virtualenv&lt;/code&gt; to create an isolated environment with its own separate import path you can drop things into.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<blockquote>
  <p>Now to figure out what to do in
  production…</p>
</blockquote>

<p>A Django deployment which has to manually futz with <code>sys.path</code> from Python code just to find its own apps is a Django deployment that shouldn&#8217;t happen; typically it points to conceptual problems further up the chain (and the fact that you&#8217;ve copy/pasted bits from Brian&#8217;s code without seeing what you&#8217;re actually using is a further indicator of such).</p>

<p>The Python path really isn&#8217;t that tough a thing to master, and once you know how it works, you just put application modules on the Python path. Not in an &#8220;apps&#8221; folder, not in the bizarre structure Pinax uses (and which I&#8217;ve complained about endlessly to the Pinax folks), just right there on your Python path where you know you can import them without any trouble.</p>

<p>For truly complex situations (and Pinax doesn&#8217;t even come close to complex enough to need this), use <code>virtualenv</code> to create an isolated environment with its own separate import path you can drop things into.</p>]]></content:encoded>
	</item>
</channel>
</rss>
