__settings py MEDIA_ROOT home dares edblog media STATIC_ROOT home dare

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
__settings.py
MEDIA_ROOT = '/home/dares/edblog/media/'
STATIC_ROOT = '/home/dares/edblog/static/'
MEDIA_URL = '/media/'
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/media/'
__urls.py
urlpatterns += patterns('',
(r'^media/(.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
(r'^static/(.*)$', 'django.views.static.serve',
{'document_root': settings.STATIC_ROOT}),
)