from django.conf.urls import patterns, url

from roomsensor import views

urlpatterns = patterns('',
    url(r'^$', views.index, name='roomsensor'),

    # ex: /roomsensor/name/
    url(r'^(?P<roomsensor_name>\w+)/$', views.display, name='roomsensor_display'),
    url(r'^(?P<roomsensor_name>\w+)/read/$', views.read, name='roomsensor_read'),

    # JSON data for graph creation
    url(r'^(?P<roomsensor_name>\w+)/rawdata/(?P<datapoints>\d+)/(?P<compression_factor>\d+)/$', views.rawdata, name='roomsensor_rawdata'),
)
[(6, 'django.conf.urls.url', 'url', (['"""^$"""', 'views.index'], {'name': '"""roomsensor"""'}), False, 'from django.conf.urls import patterns, url\n'), (9, 'django.conf.urls.url', 'url', (['"""^(?P<roomsensor_name>\\\\w+)/$"""', 'views.display'], {'name': '"""roomsensor_display"""'}), False, 'from django.conf.urls import patterns, url\n'), (10, 'django.conf.urls.url', 'url', (['"""^(?P<roomsensor_name>\\\\w+)/read/$"""', 'views.read'], {'name': '"""roomsensor_read"""'}), False, 'from django.conf.urls import patterns, url\n'), (13, 'django.conf.urls.url', 'url', (['"""^(?P<roomsensor_name>\\\\w+)/rawdata/(?P<datapoints>\\\\d+)/(?P<compression_factor>\\\\d+)/$"""', 'views.rawdata'], {'name': '"""roomsensor_rawdata"""'}), False, 'from django.conf.urls import patterns, url\n')]