from django.urls import path
from . import views
from django.contrib.auth.views import LoginView
from django.contrib.auth.decorators import login_required

app_name = "music"

urlpatterns = [

    path('', views.IndexView.as_view(), name="index"),
    path('album/<int:pk>/detail', views.DetailView.as_view(), name="detail"),
    path('album/store/',login_required(views.AlbumCreate.as_view()), name="store"),
    path('album/<int:pk>/update',views.AlbumCreate.as_view(), name="update"),
    path('album/<int:pk>/delete/',views.AlbumDelete.as_view(), name="delete"),
    path('login', LoginView.as_view(template_name='music/login.html'), name="login"),
    path('sign-up', views.signup, name="register"),
    path('dashboard', views.dashboardView, name="dashboard"),
    path('logout', views.Logout, name="logout"),
]