from rest_framework.routers import DefaultRouter
# from .apiviews import PollViewSet

from django.urls import path
from . views import *

router = DefaultRouter()
# router.register('listusers', UserViewSet)

urlpatterns = [
    path("register/", RegistrationView.as_view(), name="user_create"),
    path('register/confirm-email/<str:uidb64><str:token>/',
         EmailConfirmView.as_view(), name='email_confirm'),
    path("login/", LoginView.as_view(), name="login"),
    path("logout/", LogOutView.as_view(), name="logout"),
    path('listusers/', UserViewSet.as_view(), name='users'),
    path('listusers/<int:pk>/',
         UserViewSet.as_view(), name='update_users'),
    path('listroles/', RolesScreensView.as_view(), name='roles'),
    path('listroles/<int:pk>/',
         RolesScreensView.as_view(), name='update_roles'),
]
urlpatterns += router.urls
