from django.conf.urls import url

from .views import (
    ElectionTypesView,
    AllElectionsView,
    IDCreatorWizard,
    FORMS,
    CONDITION_DICT,
    ReferenceDefinitionView,
    SingleElection,
)
from elections.views.sync import get_election_fixture


id_creator_wizard = IDCreatorWizard.as_view(
    FORMS,
    url_name='id_creator_step',
    done_step_name='home',
    condition_dict=CONDITION_DICT)


urlpatterns = [
    url(r'^election_types$',
        ElectionTypesView.as_view(),
        name='election_types_view'),
    url(r'^reference_definition$',
        ReferenceDefinitionView.as_view(),
        name='reference_definition_view'),

    url(r'^elections$',
        AllElectionsView.as_view(),
        name='elections_view'),
    url(r'^elections/(?P<election_id>.+)/$',
        SingleElection.as_view(),
        name='single_election_view'),

    url(r'^id_creator/(?P<step>.+)/$', id_creator_wizard, name='id_creator_step'),
    url(r'^id_creator/$', id_creator_wizard, name='id_creator'),

    url(r'^sync/$', get_election_fixture),
]

@@ -445,20 +445,21 @@
 on_types
+/
 $',%0A
-
         
@@ -555,16 +555,17 @@
 finition
+/
 $',%0A    
@@ -639,32 +639,32 @@
 nition_view'),%0A%0A
-
     url(r'%5Eelect
@@ -667,16 +667,17 @@
 lections
+/
 $',%0A    

add missing tailing slashes