Skip to content

Instantly share code, notes, and snippets.

@ghing ghing/urls.py
Created Aug 16, 2010

Embed
What would you like to do?
Sample Django urls.py 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
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
(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.