source: mauRepo/MolesManager/trunk/cedaMoles/MolesManager/urls.py @ 8573

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/cedaMoles/MolesManager/urls.py@8573
Revision 8573, 2.2 KB checked in by mnagni, 8 years ago (diff)

Incomplete - # 22554: "Remove the ""FollowSymLinks"""
 http://team.ceda.ac.uk/trac/ceda/ticket/22554

Fixes the localhost static files serving

Line 
1from django.conf.urls.defaults import patterns, url
2from django.views.generic.simple import redirect_to
3from django.contrib.staticfiles.urls import staticfiles_urlpatterns
4from cedaMoles.MolesManager.settings import STATIC_ROOT, STATIC_URL
5
6# Uncomment the next two lines to enable the admin:
7# from django.contrib import admin
8# admin.autodiscover()
9
10urlpatterns = patterns('',
11    # Examples:
12    # url(r'^$', 'MolesManager.views.home', name='home'),
13    # url(r'^MolesManager/', include('MolesManager.foo.urls')),
14
15    # Uncomment the admin/doc line below to enable admin documentation:
16    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
17
18    # Uncomment the next line to enable the admin:
19    # url(r'^admin/', include(admin.site.urls)),
20)
21
22#urlpatterns += patterns('MolesManager.views.cedaObservationView',
23#
24#    (r'cov/(\d+)$', 'objView'),
25#)
26
27#urlpatterns += patterns('MolesManager.views.cedaObservationCollectionView',
28#
29#    (r'cov2/(\d+)$', 'objView'),
30#)
31
32urlpatterns += patterns('MolesManager.views.cedaSearch',
33    (r'guid/(\w+)$', 'getResponseByGuid'),
34)
35
36#urlpatterns += patterns('MolesManager.views.index',
37#
38#    (r'cov/$', 'home'),
39#)
40
41urlpatterns += patterns('MolesManager.views.cedacat',
42
43    (r'(\w{32})$', 'cedacat'),
44)
45
46urlpatterns += patterns('MolesManager.views.cedaSearch',
47
48    (r'search/$',  'coSearch'),
49     #redirect_to, {'url': 'http://www.ceda.ac.uk'}),#'coSearchRedirect'),
50    )
51
52
53urlpatterns += patterns('MolesManager.views',
54    (r'^$', 'index.home'),
55)
56
57if STATIC_URL == 'http://127.0.0.1:8000/static/':
58    urlpatterns += patterns('',
59       url(r'css/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/css' , 'show_indexes': True}),
60    )
61
62    urlpatterns += patterns('',
63       url(r'css/960/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/css/960' , 'show_indexes': True}),
64    )
65
66    urlpatterns += patterns('',
67       url(r'img/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/img' , 'show_indexes': True}),
68    )
69
70    urlpatterns += patterns('',
71       url(r'js/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/js' , 'show_indexes': True}),
72    )
73
74#urlpatterns += staticfiles_urlpatterns()
75
Note: See TracBrowser for help on using the repository browser.