Created
August 28, 2012 14:52
-
-
Save GeorgeErickson/3498709 to your computer and use it in GitHub Desktop.
Serving static files in django for development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf import settings | |
from django.conf.urls.defaults import patterns, url | |
import os | |
urlpatterns = patterns('',) | |
if settings.DEBUG: | |
urlpatterns += patterns('', | |
url(r'^(?P<path>.*)$', 'django.views.static.serve', {'document_root': os.getcwd()}) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment