1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
from django.conf.urls import *
from django.conf import settings
from django.views.static import serve
from os import path
# Don't use this file on the server!
local_urlpatterns = [
# Files uploaded by users
url(r'^wlmedia/(?P<path>.*)$',
serve,
{'document_root': settings.MEDIA_ROOT},
name='static_media'),
# Static files. Use the 'collectstatic' command to fetch them
url(r'^static/(?P<path>.*)$',
serve,
{'document_root': settings.STATIC_ROOT},
name='static_media_foreign'),
# HTML documentation created by ./manage.py create_docs
url(r'^documentation/(?P<path>.*)$',
serve,
{'document_root': path.join(
settings.MEDIA_ROOT, 'documentation/html')},
name='documentation')
]
|