from django.conf.urls import patterns, url

from .views import ReportCreatorView, ProjectReportSetupView, ReportTemplateUpdateView, ReportTemplateCreateView, \
    ReportTemplateDetailView, ReportTemplateListView
from .models import ReportTemplate

urlpatterns = patterns('',
                       url(regex=r'^$',
                           view=ReportTemplateListView.as_view(),
                           name=ReportTemplate.overview_url),

                       url(regex=r'^(?P<pk>\d+)/$',
                           view=ReportTemplateDetailView.as_view(),
                           name=ReportTemplate.detail_url),

                       url(regex=r'^update/(?P<pk>\d+)/$',
                           view=ReportTemplateUpdateView.as_view(),
                           name=ReportTemplate.update_url),

                       url(regex=r'^create/$',
                           view=ReportTemplateCreateView.as_view(),
                           name=ReportTemplate.create_url),

                       url(regex=r'^report_setup/(?P<pk>\d+)/$',
                           view=ProjectReportSetupView.as_view(),
                           name='project_report_setup'),

                       url(regex=r'^report/$',
                           view=ReportCreatorView.as_view(),
                           name='project_report_create'),
                       )
