from django.conf.urls import patterns, url

from .rest_views import *

# web api itself is mostly used by the control sw

urlpatterns = patterns('',

                       # used by control sw
                       url(regex=r'^panelists/$',
                           view=RestListBase.as_view(model=Panelist, serializer_class=PanelistsSerializer),
                           name='panelists_rest_list'),

                       # used by control sw
                       url(regex=r'^allsamples/$',
                           view=SamplesRestList.as_view(model=Sample, serializer_class=AllSamplesSerializer),
                           name='samples_rest_list'),

                       # control sw only
                       url(regex=r'^deviceswithcalib/$',
                           view=DeviceWithCalibrationSetRest.as_view()),

                       url(regex=r'^im/$',
                           view=IncompleteMeasurements.as_view()),

                       # save new measurements
                       url(r'^postmeasurement/$',
                           PostMeasurement.as_view()),

                       # update measurements (existing parts)
                       url(r'^putmeasurement/(?P<pk>\d+)/$',
                           PutMeasurement.as_view()),

                       # add new rounds to an existing measurement
                       url(r'^postnewrounds/$',
                           PostNewRounds.as_view()),
)




