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

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/cedaMoles/MolesManager/urls.py@8499
Revision 8499, 2.1 KB checked in by gparton, 7 years ago (diff)

now deals with Obs and ObsCollection? GUIDs properly in URLs

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