from django.conf.urls import url, include
from rest_framework import routers

from voting import api_views

from voting.views import VotingMainView, VotingVoteView

router = routers.DefaultRouter()
router.register(r'voting/votings', api_views.VotingViewSet, base_name='api-voting-votings')
router.register(r'voting/votings/(?P<voting>\d+)/questions', api_views.QuestionViewSet, base_name='api-voting-questions')
router.register(r'voting/votings/(?P<voting>\d+)/voters', api_views.VoterViewSet, base_name='api-voting-voters')
router.register(r'voting/available-votings', api_views.AvailableVotingsViewSet, base_name='api-voting-available-votings')
router.register(r'voting/vote-voting', api_views.VoteVotingViewSet, base_name='api-voting-vote-voting')

app_name = 'voting'

urlpatterns = [
    url(r'^$', VotingMainView.as_view(), name='voting-main'),
    url(r'^vote/(?P<pk>\d+)/$', VotingVoteView.as_view(), name='voting-vote-by-pk'),
    url(r'^vote-by-key/(?P<voter_key>[\w\d]+)/$', VotingVoteView.as_view(), name='voting-vote-by-key'),  # For external links without auth
]

dc8e803d8464d5534f0712ce6751e806cce15925
<mask token>

<mask token>
router.register('voting/votings', api_views.VotingViewSet, base_name=
    'api-voting-votings')
router.register('voting/votings/(?P<voting>\\d+)/questions', api_views.
    QuestionViewSet, base_name='api-voting-questions')
router.register('voting/votings/(?P<voting>\\d+)/voters', api_views.
    VoterViewSet, base_name='api-voting-voters')
router.register('voting/available-votings', api_views.
    AvailableVotingsViewSet, base_name='api-voting-available-votings')
router.register('voting/vote-voting', api_views.VoteVotingViewSet,
    base_name='api-voting-vote-voting')
<mask token>

<mask token>
router = routers.DefaultRouter()
router.register('voting/votings', api_views.VotingViewSet, base_name=
    'api-voting-votings')
router.register('voting/votings/(?P<voting>\\d+)/questions', api_views.
    QuestionViewSet, base_name='api-voting-questions')
router.register('voting/votings/(?P<voting>\\d+)/voters', api_views.
    VoterViewSet, base_name='api-voting-voters')
router.register('voting/available-votings', api_views.
    AvailableVotingsViewSet, base_name='api-voting-available-votings')
router.register('voting/vote-voting', api_views.VoteVotingViewSet,
    base_name='api-voting-vote-voting')
app_name = 'voting'
urlpatterns = [url('^$', VotingMainView.as_view(), name='voting-main'), url
    ('^vote/(?P<pk>\\d+)/$', VotingVoteView.as_view(), name=
    'voting-vote-by-pk'), url('^vote-by-key/(?P<voter_key>[\\w\\d]+)/$',
    VotingVoteView.as_view(), name='voting-vote-by-key')]

from django.conf.urls import url, include
from rest_framework import routers
from voting import api_views
from voting.views import VotingMainView, VotingVoteView
router = routers.DefaultRouter()
router.register('voting/votings', api_views.VotingViewSet, base_name=
    'api-voting-votings')
router.register('voting/votings/(?P<voting>\\d+)/questions', api_views.
    QuestionViewSet, base_name='api-voting-questions')
router.register('voting/votings/(?P<voting>\\d+)/voters', api_views.
    VoterViewSet, base_name='api-voting-voters')
router.register('voting/available-votings', api_views.
    AvailableVotingsViewSet, base_name='api-voting-available-votings')
router.register('voting/vote-voting', api_views.VoteVotingViewSet,
    base_name='api-voting-vote-voting')
app_name = 'voting'
urlpatterns = [url('^$', VotingMainView.as_view(), name='voting-main'), url
    ('^vote/(?P<pk>\\d+)/$', VotingVoteView.as_view(), name=
    'voting-vote-by-pk'), url('^vote-by-key/(?P<voter_key>[\\w\\d]+)/$',
    VotingVoteView.as_view(), name='voting-vote-by-key')]

from django.conf.urls import url, include
from rest_framework import routers

from voting import api_views

from voting.views import VotingMainView, VotingVoteView

router = routers.DefaultRouter()
router.register(r'voting/votings', api_views.VotingViewSet, base_name='api-voting-votings')
router.register(r'voting/votings/(?P<voting>\d+)/questions', api_views.QuestionViewSet, base_name='api-voting-questions')
router.register(r'voting/votings/(?P<voting>\d+)/voters', api_views.VoterViewSet, base_name='api-voting-voters')
router.register(r'voting/available-votings', api_views.AvailableVotingsViewSet, base_name='api-voting-available-votings')
router.register(r'voting/vote-voting', api_views.VoteVotingViewSet, base_name='api-voting-vote-voting')

app_name = 'voting'

urlpatterns = [
    url(r'^$', VotingMainView.as_view(), name='voting-main'),
    url(r'^vote/(?P<pk>\d+)/$', VotingVoteView.as_view(), name='voting-vote-by-pk'),
    url(r'^vote-by-key/(?P<voter_key>[\w\d]+)/$', VotingVoteView.as_view(), name='voting-vote-by-key'),  # For external links without auth
]
