~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to local_urls.py.sample

  • Committer: Holger Rapp
  • Date: 2010-09-26 13:30:30 UTC
  • Revision ID: sirver@gmx.de-20100926133030-ceirjf83vde91tyt
Added a simple events model to display dates on the homepage

Show diffs side-by-side

added added

removed removed

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