<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>bart's blog - Latest Comments in Two simple techniques to make your Django projects ultra portable</title><link>http://bartoosh.disqus.com/</link><description></description><atom:link href="https://bartoosh.disqus.com/two_simple_techniques_to_make_your_django_projects_ultra_portable/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 06 Oct 2008 06:51:09 -0000</lastBuildDate><item><title>Re: Two simple techniques to make your Django projects ultra portable</title><link>http://bartek.im/2008/10/03/two-simple-techniques-to-make-your-django-projects-ultra-portable/#comment-2890975</link><description>&lt;p&gt;Doh, that's what I get when I am in a rush. Fixed my post up there&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bartek</dc:creator><pubDate>Mon, 06 Oct 2008 06:51:09 -0000</pubDate></item><item><title>Re: Two simple techniques to make your Django projects ultra portable</title><link>http://bartek.im/2008/10/03/two-simple-techniques-to-make-your-django-projects-ultra-portable/#comment-2885969</link><description>&lt;p&gt;Note, you're still hard coding the '/' in your post. That's where you should be using &lt;code&gt;os.path.join&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">SmileyChris</dc:creator><pubDate>Sun, 05 Oct 2008 22:30:07 -0000</pubDate></item><item><title>Re: Two simple techniques to make your Django projects ultra portable</title><link>http://bartek.im/2008/10/03/two-simple-techniques-to-make-your-django-projects-ultra-portable/#comment-2885028</link><description>&lt;p&gt;Hey thanks, good to know that! I'll update my post to reflect that .. and of&lt;br&gt;course use it from now on :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bartek</dc:creator><pubDate>Sun, 05 Oct 2008 20:47:10 -0000</pubDate></item><item><title>Re: Two simple techniques to make your Django projects ultra portable</title><link>http://bartek.im/2008/10/03/two-simple-techniques-to-make-your-django-projects-ultra-portable/#comment-2882918</link><description>&lt;p&gt;&lt;code&gt;ROOT_DIR = os.path.join(os.path.dirname(__file__))&lt;/code&gt; uses join incorrectly. The point of os.path.join is to join path components in a generic way that works across operating systems: Here's what you should use:&lt;/p&gt;&lt;p&gt;&lt;code&gt;PROJECT_ROOT = os.path.dirname(__file__)&lt;br&gt;MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media')&lt;/code&gt;&lt;/p&gt;&lt;p&gt;And a tip for your &lt;a href="http://urls.py" rel="nofollow noopener" target="_blank" title="urls.py"&gt;urls.py&lt;/a&gt; for nicely serving static files in development mode:&lt;br&gt;&lt;code&gt;# Static media&lt;br&gt;import sys&lt;br&gt;if 'runserver' in sys.argv:&lt;br&gt;----from django.conf import settings&lt;br&gt;----urlpatterns += patterns('django.views.static',&lt;br&gt;--------(r'^%s(?P&amp;lt;path&amp;gt;.*)' % settings.MEDIA_URL[1:], 'serve', {'document_root': settings.MEDIA_ROOT}),&lt;br&gt;----)&lt;/code&gt;&lt;br&gt;&lt;em&gt;Edit: indented with dashes to preserve spacing&lt;/em&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">SmileyChris</dc:creator><pubDate>Sun, 05 Oct 2008 16:53:25 -0000</pubDate></item><item><title>Re: Two simple techniques to make your Django projects ultra portable</title><link>http://bartek.im/2008/10/03/two-simple-techniques-to-make-your-django-projects-ultra-portable/#comment-2834173</link><description>&lt;p&gt;Great tips!  Changing my settings files now.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John</dc:creator><pubDate>Fri, 03 Oct 2008 21:12:11 -0000</pubDate></item></channel></rss>