<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Code Spatter - Latest Comments in How to Add Locations to Python Path for Reusable Django Apps</title><link>http://codespatter.disqus.com/</link><description></description><atom:link href="https://codespatter.disqus.com/how_to_add_locations_to_python_path_for_reusable_django_apps/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 13 Mar 2013 11:51:33 -0000</lastBuildDate><item><title>Re: How to Add Locations to Python Path for Reusable Django Apps</title><link>http://codespatter.com/2009/04/10/how-to-add-locations-to-python-path-for-reusable-django-apps/#comment-828028792</link><description>&lt;p&gt;Nearly 4 years later, this is still a great post.  I linked to this on StackOverflow crediting you with the solution to my issue of "Django ImportError, No Module named 'app'"  Thank you.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pr0ducer</dc:creator><pubDate>Wed, 13 Mar 2013 11:51:33 -0000</pubDate></item><item><title>Re: How to Add Locations to Python Path for Reusable Django Apps</title><link>http://codespatter.com/2009/04/10/how-to-add-locations-to-python-path-for-reusable-django-apps/#comment-232034341</link><description>&lt;p&gt;Edit: I still needed to modify &lt;a href="http://settings.py" rel="nofollow noopener" target="_blank" title="settings.py"&gt;settings.py&lt;/a&gt; after all, to allow &lt;a href="http://manage.py" rel="nofollow noopener" target="_blank" title="manage.py"&gt;manage.py&lt;/a&gt; syncdb and &lt;a href="http://manage.py" rel="nofollow noopener" target="_blank" title="manage.py"&gt;manage.py&lt;/a&gt; runserver to know that the apps folder should be added. Works like a charm, thanks again for this post!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jdawg</dc:creator><pubDate>Wed, 22 Jun 2011 13:18:15 -0000</pubDate></item><item><title>Re: How to Add Locations to Python Path for Reusable Django Apps</title><link>http://codespatter.com/2009/04/10/how-to-add-locations-to-python-path-for-reusable-django-apps/#comment-232027342</link><description>&lt;p&gt;Great post. Under mod_wsgi was able to do this without editing &lt;a href="http://settings.py" rel="nofollow noopener" target="_blank" title="settings.py"&gt;settings.py&lt;/a&gt; at all, just my .wsgi file, which looks like:&lt;/p&gt;&lt;p&gt;import os&lt;br&gt;import sys&lt;/p&gt;&lt;p&gt;#Calculate the path based on the location of the WSGI script.&lt;br&gt;apache_configuration= os.path.dirname(__file__)&lt;/p&gt;&lt;p&gt;project = os.path.dirname(apache_configuration)&lt;br&gt;if project not in sys.path:&lt;br&gt;    sys.path.append(project)&lt;/p&gt;&lt;p&gt;# Add re-usable apps directory to path&lt;br&gt;apps    = project + "/apps"&lt;br&gt;sys.path.append(apps)&lt;/p&gt;&lt;p&gt;os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'&lt;/p&gt;&lt;p&gt;import django.core.handlers.wsgi&lt;br&gt;application = django.core.handlers.wsgi.WSGIHandler()&lt;/p&gt;&lt;p&gt;# To Debug path issues&lt;br&gt;#print &amp;gt;&amp;gt; sys.stderr, sys.path&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jdawg</dc:creator><pubDate>Wed, 22 Jun 2011 13:12:16 -0000</pubDate></item><item><title>Re: How to Add Locations to Python Path for Reusable Django Apps</title><link>http://codespatter.com/2009/04/10/how-to-add-locations-to-python-path-for-reusable-django-apps/#comment-127472326</link><description>&lt;p&gt;Thank you! I was struggling with why I couldn't get this to work in Eclipse. Now I'm golden. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">new to django</dc:creator><pubDate>Tue, 11 Jan 2011 00:30:30 -0000</pubDate></item><item><title>Re: How to Add Locations to Python Path for Reusable Django Apps</title><link>http://codespatter.com/2009/04/10/how-to-add-locations-to-python-path-for-reusable-django-apps/#comment-97841259</link><description>&lt;p&gt;Thanks for this. Novice python and django programmer, was struggling for how to get a separate 'apps' folder in my pythonpath for my django &lt;a href="http://settings.py" rel="nofollow noopener" target="_blank" title="settings.py"&gt;settings.py&lt;/a&gt; file.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">semperos</dc:creator><pubDate>Tue, 16 Nov 2010 10:14:14 -0000</pubDate></item></channel></rss>