-
Notifications
You must be signed in to change notification settings - Fork 0
/
urls.py
52 lines (41 loc) · 1.91 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
from molly.conf import applications
admin.autodiscover()
urlpatterns = patterns('',
(r'^adm/(.*)', admin.site.root),
# These are how we expect all applications to be eventually.
(r'^contact/', applications.contact.urls),
(r'^service-status/', applications.service_status.urls),
(r'^weather/', applications.weather.urls),
(r'^library/', applications.library.urls),
(r'^podcasts/', applications.podcasts.urls),
(r'^webcams/', applications.webcams.urls),
# (r'^maps/',applications.maps.url),
(r'^search/', applications.search.urls),
(r'^geolocation/', applications.geolocation.urls),
(r'^places/', applications.places.urls),
(r'^feedback/', applications.feedback.urls),
(r'^news/', applications.news.urls),
(r'^external-media/', applications.external_media.urls),
(r'^device-detection/', applications.device_detection.urls),
(r'^maps/', applications.maps.urls),
(r'', applications.home.urls),
# (r'^url-shortener/', applications.url_shortener.urls),
# (r'^events/', applications.events.urls),
# These ones still need work
)
# Redirecting old URLs
urlpatterns += patterns('django.views.generic.simple',
(r'^maps/busstop:(?P<atco>[A-Z\d]+)/(?P<remain>.*)$', 'redirect_to', {'url': '/places/atco:%(atco)s/%(remain)s'}),
(r'^maps/[a-z]\-+:(?P<id>\d{8})/(?P<remain>.*)$', 'redirect_to', {'url': '/places/oxpoints:%(id)s/%(remain)s'}),
(r'^maps/[a-z]\-+:(?P<id>[NW]\d{8})/(?P<remain>.*)$', 'redirect_to', {'url': '/places/osm:%(id)s/%(remain)s'}),
(r'^maps/(?P<remain>.*)$', 'redirect_to', {'url': '/places/%(remain)s'}),
)
handler500 = 'molly.apps.home.views.handler500'
if settings.DEBUG:
urlpatterns += patterns('',
(r'^site-media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.SITE_MEDIA_PATH})
)