Django Serve Static Files from Local Directory (development-only)


/ Published in: Django
Save to your folder(s)

Add to bottom of urls.py


Copy this code and paste it in your HTML
  1. from django.conf import settings
  2.  
  3. if settings.DEBUG:
  4. urlpatterns += patterns('',
  5. (r'^includes/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'C:/ClientWork/thosecleverkids/includes'}),
  6. )

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.