Created
August 16, 2010 20:17
-
-
Save ghing/527656 to your computer and use it in GitHub Desktop.
Sample Django urls.py that shows how to serve static content when running development server
This file contains hidden or 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.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