from django.conf import settings
....
if settings.DEBUG:
urlpatterns += patterns('',
url(r'^static_0/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATICFILES_DIRS[0], 'show_indexes': True}),
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
)
....
More Info: https://docs.djangoproject.com/en/1.2/howto/static-files/#directory-listings
No comments :
Post a Comment