from django.conf import settings
from django.conf.urls.static import static
from django.contrib.auth.views import LoginView
from django.urls import path
from .views import *

urlpatterns = [
    path('', HomePageListView.as_view(), name='main_page'),
    path('service', ServicesListView.as_view(), name='services'),
    path('service/<int:pk>', ServiceDetailView.as_view(), name='service'),
    path('add_to_cart/<int:service_id>', add_to_cart, name='add_to_cart'),
    path('logout', BBLogoutView.as_view(), name='logout'),
    path('login', LoginView.as_view(), name='login'),
    path('register', SignupView.as_view(), name='register'),
    path('profile', UserProfileView.as_view(), name='profile'),
    path('search_result', search, name='search'),

] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)