from django.conf.urls import patterns, url
from dimaps.views.service_views import *
from dimaps.views.home_views import *


urlpatterns = patterns('',
    url(
        regex=r'^service/archive/$',
        view=ServiceArchiveIndexView.as_view(),
        name='dimaps_service_archive_index'
    ),
    url(
        regex=r'^service/create/$',
        view=ServiceCreateView.as_view(),
        name='dimaps_service_create'
    ),
    url(
        regex=r'^service/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               '(?P<day>\d{1,2})/'
               '(?P<pk>\d+?)/$',
        view=ServiceDateDetailView.as_view(),
        name='dimaps_service_date_detail'
    ),
    url(
        regex=r'^service/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               '(?P<day>\d{1,2})/$',
        view=ServiceDayArchiveView.as_view(),
        name='dimaps_service_day_archive'
    ),
    url(
        regex=r'^service/(?P<pk>\d+?)/delete/$',
        view=ServiceDeleteView.as_view(),
        name='dimaps_service_delete'
    ),
    url(
        regex=r'^service/(?P<pk>\d+?)/$',
        view=ServiceDetailView.as_view(),
        name='dimaps_service_detail'
    ),
    url(
        regex=r'^service/$',
        view=ServiceListView.as_view(),
        name='dimaps_service_list'
    ),
    url(
        regex=r'^service/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/$',
        view=ServiceMonthArchiveView.as_view(),
        name='dimaps_service_month_archive'
    ),
    url(
        regex=r'^service/today/$',
        view=ServiceTodayArchiveView.as_view(),
        name='dimaps_service_today_archive'
    ),
    url(
        regex=r'^service/(?P<pk>\d+?)/update/$',
        view=ServiceUpdateView.as_view(),
        name='dimaps_service_update'
    ),
    url(
        regex=r'^service/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               'week/(?P<week>\d{1,2})/$',
        view=ServiceWeekArchiveView.as_view(),
        name='dimaps_service_week_archive'
    ),
    url(
        regex=r'^service/archive/(?P<year>\d{4})/$',
        view=ServiceYearArchiveView.as_view(),
        name='dimaps_service_year_archive'
    ),
    url(
        regex=r'^search/$',
        view=ServiceSearchView.as_view(),
        name='dimaps_service_search'
    ),
    url(
        regex=r'^search_category/$',
        view=ServiceSearchCategoryView.as_view(),
        name='dimaps_service_search_category'
    ),
)


from dimaps.views.technicaldata_views import *
urlpatterns += patterns('',
    url(
        regex=r'^technicaldata/archive/$',
        view=TechnicalDataArchiveIndexView.as_view(),
        name='dimaps_technicaldata_archive_index'
    ),
    url(
        regex=r'^technicaldata/create/$',
        view=TechnicalDataCreateView.as_view(),
        name='dimaps_technicaldata_create'
    ),
    url(
        regex=r'^technicaldata/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               '(?P<day>\d{1,2})/'
               '(?P<pk>\d+?)/$',
        view=TechnicalDataDateDetailView.as_view(),
        name='dimaps_technicaldata_date_detail'
    ),
    url(
        regex=r'^technicaldata/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               '(?P<day>\d{1,2})/$',
        view=TechnicalDataDayArchiveView.as_view(),
        name='dimaps_technicaldata_day_archive'
    ),
    url(
        regex=r'^technicaldata/(?P<pk>\d+?)/delete/$',
        view=TechnicalDataDeleteView.as_view(),
        name='dimaps_technicaldata_delete'
    ),
    url(
        regex=r'^technicaldata/(?P<pk>\d+?)/$',
        view=TechnicalDataDetailView.as_view(),
        name='dimaps_technicaldata_detail'
    ),
    url(
        regex=r'^technicaldata/$',
        view=TechnicalDataListView.as_view(),
        name='dimaps_technicaldata_list'
    ),
    url(
        regex=r'^technicaldata/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/$',
        view=TechnicalDataMonthArchiveView.as_view(),
        name='dimaps_technicaldata_month_archive'
    ),
    url(
        regex=r'^technicaldata/today/$',
        view=TechnicalDataTodayArchiveView.as_view(),
        name='dimaps_technicaldata_today_archive'
    ),
    url(
        regex=r'^technicaldata/(?P<pk>\d+?)/update/$',
        view=TechnicalDataUpdateView.as_view(),
        name='dimaps_technicaldata_update'
    ),
    url(
        regex=r'^technicaldata/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               'week/(?P<week>\d{1,2})/$',
        view=TechnicalDataWeekArchiveView.as_view(),
        name='dimaps_technicaldata_week_archive'
    ),
    url(
        regex=r'^technicaldata/archive/(?P<year>\d{4})/$',
        view=TechnicalDataYearArchiveView.as_view(),
        name='dimaps_technicaldata_year_archive'
    ),
)


from dimaps.views.serviceconsumer_views import *
urlpatterns += patterns('',
    url(
        regex=r'^serviceconsumer/archive/$',
        view=ServiceConsumerArchiveIndexView.as_view(),
        name='dimaps_serviceconsumer_archive_index'
    ),
    url(
        regex=r'^serviceconsumer/create/$',
        view=ServiceConsumerCreateView.as_view(),
        name='dimaps_serviceconsumer_create'
    ),
    url(
        regex=r'^serviceconsumer/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               '(?P<day>\d{1,2})/'
               '(?P<pk>\d+?)/$',
        view=ServiceConsumerDateDetailView.as_view(),
        name='dimaps_serviceconsumer_date_detail'
    ),
    url(
        regex=r'^serviceconsumer/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               '(?P<day>\d{1,2})/$',
        view=ServiceConsumerDayArchiveView.as_view(),
        name='dimaps_serviceconsumer_day_archive'
    ),
    url(
        regex=r'^serviceconsumer/(?P<pk>\d+?)/delete/$',
        view=ServiceConsumerDeleteView.as_view(),
        name='dimaps_serviceconsumer_delete'
    ),
    url(
        regex=r'^serviceconsumer/(?P<pk>\d+?)/$',
        view=ServiceConsumerDetailView.as_view(),
        name='dimaps_serviceconsumer_detail'
    ),
    url(
        regex=r'^serviceconsumer/$',
        view=ServiceConsumerListView.as_view(),
        name='dimaps_serviceconsumer_list'
    ),
    url(
        regex=r'^serviceconsumer/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/$',
        view=ServiceConsumerMonthArchiveView.as_view(),
        name='dimaps_serviceconsumer_month_archive'
    ),
    url(
        regex=r'^serviceconsumer/today/$',
        view=ServiceConsumerTodayArchiveView.as_view(),
        name='dimaps_serviceconsumer_today_archive'
    ),
    url(
        regex=r'^serviceconsumer/(?P<pk>\d+?)/update/$',
        view=ServiceConsumerUpdateView.as_view(),
        name='dimaps_serviceconsumer_update'
    ),
    url(
        regex=r'^serviceconsumer/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               'week/(?P<week>\d{1,2})/$',
        view=ServiceConsumerWeekArchiveView.as_view(),
        name='dimaps_serviceconsumer_week_archive'
    ),
    url(
        regex=r'^serviceconsumer/archive/(?P<year>\d{4})/$',
        view=ServiceConsumerYearArchiveView.as_view(),
        name='dimaps_serviceconsumer_year_archive'
    ),
)


from dimaps.views.operation_views import *
urlpatterns += patterns('',
    url(
        regex=r'^operation/archive/$',
        view=OperationArchiveIndexView.as_view(),
        name='dimaps_operation_archive_index'
    ),
    url(
        regex=r'^operation/create/$',
        view=OperationCreateView.as_view(),
        name='dimaps_operation_create'
    ),
    url(
        regex=r'^operation/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               '(?P<day>\d{1,2})/'
               '(?P<pk>\d+?)/$',
        view=OperationDateDetailView.as_view(),
        name='dimaps_operation_date_detail'
    ),
    url(
        regex=r'^operation/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               '(?P<day>\d{1,2})/$',
        view=OperationDayArchiveView.as_view(),
        name='dimaps_operation_day_archive'
    ),
    url(
        regex=r'^operation/(?P<pk>\d+?)/delete/$',
        view=OperationDeleteView.as_view(),
        name='dimaps_operation_delete'
    ),
    url(
        regex=r'^operation/(?P<pk>\d+?)/$',
        view=OperationDetailView.as_view(),
        name='dimaps_operation_detail'
    ),
    url(
        regex=r'^operation/$',
        view=OperationListView.as_view(),
        name='dimaps_operation_list'
    ),
    url(
        regex=r'^operation/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/$',
        view=OperationMonthArchiveView.as_view(),
        name='dimaps_operation_month_archive'
    ),
    url(
        regex=r'^operation/today/$',
        view=OperationTodayArchiveView.as_view(),
        name='dimaps_operation_today_archive'
    ),
    url(
        regex=r'^operation/(?P<pk>\d+?)/update/$',
        view=OperationUpdateView.as_view(),
        name='dimaps_operation_update'
    ),
    url(
        regex=r'^operation/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               'week/(?P<week>\d{1,2})/$',
        view=OperationWeekArchiveView.as_view(),
        name='dimaps_operation_week_archive'
    ),
    url(
        regex=r'^operation/archive/(?P<year>\d{4})/$',
        view=OperationYearArchiveView.as_view(),
        name='dimaps_operation_year_archive'
    ),
)

urlpatterns += patterns('dimaps.views.home_views',
    url(r'^$', 'index', name='index'),
    url(r'^help/', 'help', name='help'),
)

from dimaps.views.input_views import *
urlpatterns += patterns('',
    url(
        regex=r'^input/archive/$',
        view=InputArchiveIndexView.as_view(),
        name='dimaps_input_archive_index'
    ),
    url(
        regex=r'^input/create/$',
        view=InputCreateView.as_view(),
        name='dimaps_input_create'
    ),
    url(
        regex=r'^input/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               '(?P<day>\d{1,2})/'
               '(?P<pk>\d+?)/$',
        view=InputDateDetailView.as_view(),
        name='dimaps_input_date_detail'
    ),
    url(
        regex=r'^input/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               '(?P<day>\d{1,2})/$',
        view=InputDayArchiveView.as_view(),
        name='dimaps_input_day_archive'
    ),
    url(
        regex=r'^input/(?P<pk>\d+?)/delete/$',
        view=InputDeleteView.as_view(),
        name='dimaps_input_delete'
    ),
    url(
        regex=r'^input/(?P<pk>\d+?)/$',
        view=InputDetailView.as_view(),
        name='dimaps_input_detail'
    ),
    url(
        regex=r'^input/$',
        view=InputListView.as_view(),
        name='dimaps_input_list'
    ),
    url(
        regex=r'^input/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/$',
        view=InputMonthArchiveView.as_view(),
        name='dimaps_input_month_archive'
    ),
    url(
        regex=r'^input/today/$',
        view=InputTodayArchiveView.as_view(),
        name='dimaps_input_today_archive'
    ),
    url(
        regex=r'^input/(?P<pk>\d+?)/update/$',
        view=InputUpdateView.as_view(),
        name='dimaps_input_update'
    ),
    url(
        regex=r'^input/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               'week/(?P<week>\d{1,2})/$',
        view=InputWeekArchiveView.as_view(),
        name='dimaps_input_week_archive'
    ),
    url(
        regex=r'^input/archive/(?P<year>\d{4})/$',
        view=InputYearArchiveView.as_view(),
        name='dimaps_input_year_archive'
    ),
)


from dimaps.views.output_views import *
urlpatterns += patterns('',
    url(
        regex=r'^output/archive/$',
        view=OutputArchiveIndexView.as_view(),
        name='dimaps_output_archive_index'
    ),
    url(
        regex=r'^output/create/$',
        view=OutputCreateView.as_view(),
        name='dimaps_output_create'
    ),
    url(
        regex=r'^output/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               '(?P<day>\d{1,2})/'
               '(?P<pk>\d+?)/$',
        view=OutputDateDetailView.as_view(),
        name='dimaps_output_date_detail'
    ),
    url(
        regex=r'^output/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               '(?P<day>\d{1,2})/$',
        view=OutputDayArchiveView.as_view(),
        name='dimaps_output_day_archive'
    ),
    url(
        regex=r'^output/(?P<pk>\d+?)/delete/$',
        view=OutputDeleteView.as_view(),
        name='dimaps_output_delete'
    ),
    url(
        regex=r'^output/(?P<pk>\d+?)/$',
        view=OutputDetailView.as_view(),
        name='dimaps_output_detail'
    ),
    url(
        regex=r'^output/$',
        view=OutputListView.as_view(),
        name='dimaps_output_list'
    ),
    url(
        regex=r'^output/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/$',
        view=OutputMonthArchiveView.as_view(),
        name='dimaps_output_month_archive'
    ),
    url(
        regex=r'^output/today/$',
        view=OutputTodayArchiveView.as_view(),
        name='dimaps_output_today_archive'
    ),
    url(
        regex=r'^output/(?P<pk>\d+?)/update/$',
        view=OutputUpdateView.as_view(),
        name='dimaps_output_update'
    ),
    url(
        regex=r'^output/archive/(?P<year>\d{4})/'
               '(?P<month>\d{1,2})/'
               'week/(?P<week>\d{1,2})/$',
        view=OutputWeekArchiveView.as_view(),
        name='dimaps_output_week_archive'
    ),
    url(
        regex=r'^output/archive/(?P<year>\d{4})/$',
        view=OutputYearArchiveView.as_view(),
        name='dimaps_output_year_archive'
    ),
)
