
from django.conf.urls import include, url
from votita.views import (VotitaWizard,
                          CreateGatheringView,
                          CreateProposalsForGathering,
                          UpdateGatheringView,
                          ThanksForCreating,
                          GatheringListView,
                          ProposalListView,
                          ProposalDetailView,
                          GatheringView,
                          HomeView,)
from django.views.generic import TemplateView
from django.views.decorators.clickjacking import xframe_options_exempt


urlpatterns = [
    #url(r'^$', TemplateView.as_view(template_name="votita/index.html"),
    #                                  name='index'),
    url(r'^$', (xframe_options_exempt(HomeView.as_view())), name='index'),
    url(r'^materiales/$',
        TemplateView.as_view(template_name='votita/materiales.html'),
        name='materiales'),
    url(r'^que-es/$',
        TemplateView.as_view(template_name='votita/que-es.html'),
        name='que-es'),
    url(r'^crear/?$',
        VotitaWizard.as_view(),
        name='create_proposal'),
    url(r'^crear_propuestas/(?P<pk>\d+)/?$',
        CreateProposalsForGathering.as_view(),
        name='proposal_for_gathering'),
    url(r'^actualizar_encuentro/(?P<pk>\d+)/?$',
        UpdateGatheringView.as_view(),
        name='update_gathering'),
    url(r'^gracias_por_crear/(?P<pk>\d+)/?$',
        ThanksForCreating.as_view(),
        name='thanks_for_creating_a_gathering'),
    url(r'^crear_propuestas_wizard/(?P<pk>\d+)/?$',
        VotitaWizard.as_view(),
        name='create_proposal_for_gathering_wizard'),
    url(r'^crear_encuentro/?$',
        CreateGatheringView.as_view(),
        name='create_gathering'),
    url(r'^ver_encuentro/(?P<pk>\d+)/?$',
        GatheringView.as_view(),
        name='ver_encuentro'),
    url(r'^encuentros/?$',
        GatheringListView.as_view(),
        name='list_gatherings'),
    url(r'^propuestas/?$',
        ProposalListView.as_view(),
        name='list_proposals'),
    url(r'^propuestas/(?P<slug>[-\w]+)/?$',
        ProposalDetailView.as_view(),
        name='proposal_detail'),
]
