<reponame>DXDSpirits/appsbackend
from django.conf.urls import url, patterns, include
from rest_framework.routers import DefaultRouter
from poll import views

router = DefaultRouter()
router.register(r'poll', views.PollViewSet)
router.register(r'option', views.OptionViewSet)
router.register(r'vote', views.VoteViewSet)

urlpatterns = patterns('',
    url(r'^', include(router.urls)),
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
    url(r'^poll/(?P<poll>[a-z0-9]+)/voted/(?P<user>[a-z0-9]+)/$', views.poll_voted),
)
from django.conf.urls import url, patterns, include
from rest_framework.routers import DefaultRouter
from poll import views

router = DefaultRouter()
router.register(r'poll', views.PollViewSet)
router.register(r'option', views.OptionViewSet)
router.register(r'vote', views.VoteViewSet)

urlpatterns = patterns('',
    url(r'^', include(router.urls)),
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
    url(r'^poll/(?P<poll>[a-z0-9]+)/voted/(?P<user>[a-z0-9]+)/$', views.poll_voted),
)