Skip to content

Instantly share code, notes, and snippets.

@ghing ghing/
Created Aug 16, 2010

What would you like to do?
Sample Django that shows how to serve static content when running development server
from django.conf.urls.defaults import *
from django.contrib.gis import admin
import settings
urlpatterns = patterns('',
(r'^admin/', include(,
(r'^$', 'boystown.views.index'),
if settings.DEBUG:
urlpatterns += patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.