""" This module contains urls for the ``metaplans`` app. """

from django.conf.urls import url

from . import views


app_name = 'metaplans'

urlpatterns = [

    # List Metaplans by session
    url(r'^session/(?P<session_id>[-\w]+)/$',
        views.MetaplanSessionListView.as_view(),
        name='list_by_session'),

    # Create Metaplan
    url(r'^session/(?P<session_id>[-\w]+)/create/$',
        views.MetaplanCreateView.as_view(),
        name='create'),

    # Update Metaplan
    url(r'^(?P<pk>[-\w]+)/update/$',
        views.MetaplanUpdateView.as_view(),
        name='update'),

    # Delete Metaplan
    url(r'^(?P<pk>[-\w]+)/delete/$',
        views.MetaplanDeleteView.as_view(),
        name='delete'),

    # Detail Metaplan
    url(r'^(?P<pk>[-\w]+)/$', views.
        MetaplanDetailView.as_view(),
        name='detail'),

    # Export Metaplan
    url(r'^(?P<pk>[-\w]+)/export$',
        views.MetaplanExportView.as_view(),
        name='export'),

    # Create MetaplanProposition
    url(r'(?P<metaplan_id>[-\w]+)/proposition/create$',
        views.MetaplanPropositionCreateView.as_view(),
        name='create_proposition'),
]
