from django.urls import path
from . import views

app_name = "sysadmin"  # Use this namespace for reverse URL lookups

users_crud = views.UserCRUDView()

urlpatterns = [
    path('login/', views.login_view, name='login'),
    path('register/', views.register_view, name='register'),
    path('logout/', views.logout_view, name='logout'),
    path('profile/', views.profile_view, name='profile'),  # Add profile view URL

    path('users/', users_crud.get_list_view().as_view(), name='users-list'),
    path('users/create/', users_crud.get_create_view().as_view(), name='users-create'),
    path('users/<int:pk>/update/', users_crud.get_update_view().as_view(), name='users-update'),
    path('users/<int:pk>/delete/', users_crud.get_delete_view().as_view(), name='users-delete'),
]
