from django.urls import path, re_path

from . import views

app_name = 'fkrdjan'
urlpatterns = [
    path('', views.IndexView.as_view(), name='index'),
    path('metroarea/', views.MetroAreaView.as_view(), name='metroarea',),
    path('metroarea/<int:pk>/', views.MetroAreaDetailView.as_view(),
         name='metroarea_detail'),
    path('metroarea/<int:metropolitan_area_id>/history',
         views.MetroAreaHistoryView.as_view(), name='metroarea_history'),
    path('contractor/', views.ContractorView.as_view(), name='contractor'),
    path('contractor/<int:pk>/', views.ContractorDetailView.as_view(),
         name='contractor_detail'),
    path('contractor/<int:contractor_id>/history',
         views.ContractorHistoryView.as_view(), name='contractor_history'),
    path('techcustomer/', views.TechCustomerView.as_view(), name='techcustomer'),
    path('techcustomer/<int:pk>/', views.TechCustomerDetailView.as_view(),
         name='techcustomer_detail'),
    path('techcustomer/<int:technical_customer_id>/history',
         views.TechCustomerHistoryView.as_view(), name='techcustomer_history'),
    path('strelement/', views.StrElementView.as_view(), name='strelement'),
    path('strelement/<int:pk>/', views.StrElementDetailView.as_view(),
         name='strelement_detail'),
    path('strelement/<int:structural_element_id>/history',
         views.StrElementHistoryView.as_view(), name='strelement_history'),
    path('house/', views.HouseView.as_view(), name='house'),
    path('house/<int:pk>/', views.HouseDetailView.as_view(), name='house_detail'),
    path('house/<int:house_id>/history',
         views.HouseHistoryView.as_view(), name='house_history'),
    path('house/<int:house_id>/programs',
         views.RegProgramsForHouseView.as_view(), name='regprogram_house'),
    path('regprogram/', views.RegProgramView.as_view(), name='regprogram'),
    path('regprogram/<int:regprogram_id>/',
         views.RegProgramDetailListView.as_view(), name='regprogram_detail'),
    path('docprocessor', views.DocumentProcessorView.as_view(), name='docprocessor'),
    path('upload/', views.upload_file, name='upload')
]
