<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Arthur Koziel’s Blog - Latest Comments in Handling static files with Django</title><link>http://arthurkozielsblog.disqus.com/</link><description></description><atom:link href="https://arthurkozielsblog.disqus.com/handling_static_files_with_django/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 07 Oct 2009 12:35:51 -0000</lastBuildDate><item><title>Re: Handling static files with Django</title><link>http://arthurkoziel.com/2008/09/02/handling-static-files-django/index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html#comment-19409343</link><description>&lt;p&gt;The sub-domain tips have saved me 1000 headaches ;)&lt;br&gt;Thank you!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alfredo</dc:creator><pubDate>Wed, 07 Oct 2009 12:35:51 -0000</pubDate></item><item><title>Re: Handling static files with Django</title><link>http://arthurkoziel.com/2008/09/02/handling-static-files-django/index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html#comment-15754938</link><description>&lt;p&gt;i found it very usefull, ty :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Roy</dc:creator><pubDate>Wed, 02 Sep 2009 07:10:23 -0000</pubDate></item><item><title>Re: Handling static files with Django</title><link>http://arthurkoziel.com/2008/09/02/handling-static-files-django/index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html#comment-14705134</link><description>&lt;p&gt;Thanks for the post - useful. Still in the Django learning curve myself, and one mystery to me at this point is the best way to share a common CSS file across apps within a project. It might be stupidly obvious, but I can't manage it!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">DaveEveritt</dc:creator><pubDate>Wed, 12 Aug 2009 06:37:46 -0000</pubDate></item><item><title>Re: Handling static files with Django</title><link>http://arthurkoziel.com/2008/09/02/handling-static-files-django/index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html#comment-12055503</link><description>&lt;p&gt;It is helpful. Thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">SDC</dc:creator><pubDate>Thu, 02 Jul 2009 21:45:28 -0000</pubDate></item><item><title>Re: Handling static files with Django</title><link>http://arthurkoziel.com/2008/09/02/handling-static-files-django/index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html#comment-10288580</link><description>&lt;p&gt;Yup, that did it! Thanks so much!! That was driving me nuts. It also helped me understand the patterns a bit more.&lt;/p&gt;&lt;p&gt;Again, thank you for the great resource your providing!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">990adjustments</dc:creator><pubDate>Sat, 30 May 2009 03:30:48 -0000</pubDate></item><item><title>Re: Handling static files with Django</title><link>http://arthurkoziel.com/2008/09/02/handling-static-files-django/index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html#comment-10264598</link><description>&lt;p&gt;Sounds like you're using contrib.flatpages. The flatpages urlconf has a catch-all rule which tries to find the "/resources/css/style.css" in the database and then throws a 404 because it couldn't find it. It never gets to the static media pattern.&lt;/p&gt;&lt;p&gt;To solve this, just make sure that the static-media pattern comes before the flatpages pattern in your &lt;a href="http://urls.py" rel="nofollow noopener" target="_blank" title="urls.py"&gt;urls.py&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">arthurk</dc:creator><pubDate>Fri, 29 May 2009 13:26:14 -0000</pubDate></item><item><title>Re: Handling static files with Django</title><link>http://arthurkoziel.com/2008/09/02/handling-static-files-django/index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html#comment-10263297</link><description>&lt;p&gt;Thanks for the info. Would you know what may cause the static files not to be served. I've read the docs back and forth and followed your example along with countless others on the net and still nothing. I made sure my MEDIA_URL and ADMIN_MEDIA_PREFIX were different but still no static files.&lt;/p&gt;&lt;p&gt;When I hit 127.0.0.1/resources/css/style.css&lt;br&gt;I get a 404 flatpage not found error&lt;/p&gt;&lt;p&gt;At a total loss...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">990adjustments</dc:creator><pubDate>Fri, 29 May 2009 12:47:58 -0000</pubDate></item><item><title>Re: Handling static files with Django</title><link>http://arthurkoziel.com/2008/09/02/handling-static-files-django/index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html#comment-8341695</link><description>&lt;p&gt;Thanks, so much. I wonder why official docs don't clarify this point--it's very confusing to the uninitiated. I appreciate your making the effort to 'initiate' some of us!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Joseph</dc:creator><pubDate>Sat, 18 Apr 2009 22:40:52 -0000</pubDate></item><item><title>Re: Handling static files with Django</title><link>http://arthurkoziel.com/2008/09/02/handling-static-files-django/index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html#comment-5239140</link><description>&lt;p&gt;Thanks alot for this, had a hard time figuring out on how to handle static media files with Django. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Stocks</dc:creator><pubDate>Tue, 06 Jan 2009 04:54:00 -0000</pubDate></item><item><title>Re: Handling static files with Django</title><link>http://arthurkoziel.com/2008/09/02/handling-static-files-django/index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html#comment-5239076</link><description>&lt;p&gt;Fixed, thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arthur</dc:creator><pubDate>Sat, 13 Sep 2008 00:47:00 -0000</pubDate></item><item><title>Re: Handling static files with Django</title><link>http://arthurkoziel.com/2008/09/02/handling-static-files-django/index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html#comment-5239075</link><description>&lt;p&gt;You have a stray brace after "'/path/to/static_media')," ;)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">leafar</dc:creator><pubDate>Fri, 12 Sep 2008 13:05:00 -0000</pubDate></item><item><title>Re: Handling static files with Django</title><link>http://arthurkoziel.com/2008/09/02/handling-static-files-django/index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html#comment-5239068</link><description>&lt;p&gt;Thanks a lot for this article.&lt;br&gt;Clear and useful!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex</dc:creator><pubDate>Sat, 06 Sep 2008 05:07:00 -0000</pubDate></item><item><title>Re: Handling static files with Django</title><link>http://arthurkoziel.com/2008/09/02/handling-static-files-django/index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html#comment-5239065</link><description>&lt;p&gt;Yes the MEDIA_URL will be in your RequestContext as long as the "&lt;a href="http://django.core.context_processors.media" rel="nofollow noopener" target="_blank" title="django.core.context_processors.media"&gt;django.core.context_process...&lt;/a&gt;" is in your TEMPLATE_CONTEXT_PROCESSORS setting (which it is by default).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arthur</dc:creator><pubDate>Fri, 05 Sep 2008 23:29:00 -0000</pubDate></item><item><title>Re: Handling static files with Django</title><link>http://arthurkoziel.com/2008/09/02/handling-static-files-django/index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html#comment-5239063</link><description>&lt;p&gt;Thanks for the {{media_url}} trick on the template. I got to try it. will the media_url be available with doing anything?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James</dc:creator><pubDate>Fri, 05 Sep 2008 17:42:00 -0000</pubDate></item><item><title>Re: Handling static files with Django</title><link>http://arthurkoziel.com/2008/09/02/handling-static-files-django/index.htmlindex.htmlindex.htmlindex.htmlindex.htmlindex.html#comment-5239059</link><description>&lt;p&gt;Thank you so much for this post! I have been very confused by the the MEDIA_URL and MEDIA_ROOT settings. They documentation doesn't explain how to use them at all. Thank you for laying it all out.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jer</dc:creator><pubDate>Thu, 04 Sep 2008 00:11:00 -0000</pubDate></item></channel></rss>