Package madrona :: Package common :: Module urls
[hide private]

Source Code for Module madrona.common.urls

 1  from django.conf.urls.defaults import * 
 2  from django.contrib import admin 
 3  from django.conf import settings 
 4   
 5  if settings.LAUNCH_PAGE: 
 6      urlpatterns = patterns('madrona.common.views', 
 7          url(r'^$', 'launch', name='launch'), 
 8          url(r'^map/', 'map', name='map'), 
 9      ) 
10  else: 
11      urlpatterns = patterns('madrona.common.views', 
12          url(r'^$', 'map', name='map'), 
13      ) 
14   
15  urlpatterns += patterns('madrona', 
16      (r'^accounts/', include('madrona.openid.urls')), 
17      (r'^accounts/profile/', include('madrona.user_profile.urls')), 
18      (r'^faq/', include('madrona.simplefaq.urls')), 
19      (r'^features/', include('madrona.features.urls')), 
20      (r'^help/', include('madrona.help.urls')), 
21      (r'^kml/', include('madrona.kmlapp.urls')), 
22      (r'^layers/', include('madrona.layers.urls')), 
23      (r'^loadshp/', include('madrona.loadshp.urls')), 
24      (r'^manipulators/', include('madrona.manipulators.urls')), 
25      (r'^news/', include('madrona.news.urls')), 
26      (r'^screencasts/', include('madrona.screencasts.urls')), 
27      (r'^staticmap/', include('madrona.staticmap.urls')), 
28      (r'^studyregion/', include('madrona.studyregion.urls')), 
29      (r'^bookmark/', include('madrona.bookmarks.urls')), 
30      (r'^layer_manager/', include('madrona.layer_manager.urls')), 
31      # Optional 
32      #(r'^heatmap/', include('madrona.heatmap.urls')), 
33  ) 
34   
35  urlpatterns += patterns('', 
36      (r'^admin/', include(admin.site.urls)), 
37  ) 
38   
39  # Useful for serving files when using the django dev server 
40  urlpatterns += patterns('', 
41      (r'^media(.*)/upload/', 'madrona.common.views.forbidden'), 
42      (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}), 
43  ) 
44