source: mauRepo/MolesManager/trunk/src/MolesManager/urls.py @ 8433

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/MolesManager/urls.py@8433
Revision 8433, 2.0 KB checked in by mnagni, 7 years ago (diff)

Two main new features:
1) the migration generate a report. The report is sent by mail to the subscribers defined in the settings.py
2) require to display a missing observation adds a message on the page and hides the some fields in the html form
3) a new javascript library (commons.js)

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
21urlpatterns += patterns('MolesManager.views.cedaObservationView',
22
23    (r'cov/(\w+)$', 'coView'),
24)
25
26urlpatterns += patterns('MolesManager.views.cedaBrowse',
27
28    (r'browse/(\d+)$', 'browseView'),
29)
30
31urlpatterns += patterns('MolesManager.views.index',
32
33    (r'cov/$', 'home'),
34)
35
36urlpatterns += patterns('MolesManager.views.cedacat',
37
38    (r'(\w{32})$', 'cedacat'),
39)
40
41urlpatterns += patterns('MolesManager.views.cedaSearch',
42
43    (r'search/$',  'coSearch'),
44     #redirect_to, {'url': 'http://www.ceda.ac.uk'}),#'coSearchRedirect'),
45    )
46
47
48urlpatterns += patterns('MolesManager.views',
49    (r'^$', 'index.home'),
50)
51
52if SERVE_STATIC_CONTENT:
53    urlpatterns += patterns('',
54       url(r'css/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/css' , 'show_indexes': True}),
55    )
56
57    urlpatterns += patterns('',
58       url(r'css/960/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/css/960' , 'show_indexes': True}),
59    )
60
61    urlpatterns += patterns('',
62       url(r'img/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/img' , 'show_indexes': True}),
63    )
64
65    urlpatterns += patterns('',
66       url(r'js/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/js' , 'show_indexes': True}),
67    )
68
69#urlpatterns += staticfiles_urlpatterns()
70
Note: See TracBrowser for help on using the repository browser.