urls.py 1.25 KB
Newer Older
Alan Mitchell's avatar
Alan Mitchell committed
1 2 3 4 5 6 7
'''
URLs for the BMS Application
'''

from django.conf.urls import patterns, url

urlpatterns = patterns('bmsapp.views',
8 9
    url(r'^readingdb/reading/(\w+)/store/$', 'store_reading'),      # URL to store one reading into database
    url(r'^readingdb/reading/store/$', 'store_readings'),          # URL to store multiple readings into database
10
    url(r'^st8(\w+)/', 'store_reading_old'),             # Old URL pattern for storing.  Shouldn't be used for new sensors.
11
    url(r'^readingdb/reading/(\w+)/$', 'get_readings'),   # gets all readings for one reading ID.
Alan Mitchell's avatar
Alan Mitchell committed
12 13
    url(r'^$', 'index'),
    url(r'^reports/$', 'reports', name='reports'),
14
    url(r'^reports/results/$', 'get_report_results'),
15
    url(r'^reports/(\d+)/$', 'reports'),
Alan Mitchell's avatar
Alan Mitchell committed
16
    url(r'^show_log/$', 'show_log'),
17
    url(r'^bldg_list/(\d+)/$', 'bldg_list'),
18 19
    url(r'^chart_sensor_list/(\d+)/(multi)/$', 'chart_sensor_list'),
    url(r'^chart_sensor_list/(\d+)/(\d+)/$', 'chart_sensor_list'),
20
    url(r'^map_json/$', 'map_json', name='map-json'),
Alan Mitchell's avatar
Alan Mitchell committed
21
    url(r'^training/video/(\w+)/(\d+)/(\d+)/$', 'show_video', name='show-video'),
22
    url(r'^make_store_key/$', 'make_store_key'),
23 24 25

    # catches URLs that don't match the above patterns.  Assumes they give a template name to render.
    url(r'^(\w+)/$', 'wildcard'),      
Alan Mitchell's avatar
Alan Mitchell committed
26
)