from django.apps import apps from django.urls import path from accounts import views app_name = "account" urlpatterns = [ path("", views.customer_home, name="home"), path("login/", views.CustomerLoginView.as_view(), name="login"), path("logout/", views.customer_logout, name="logout"), path("register/", views.customer_register, name="register"), path("profile/", views.customer_profile, name="profile"), ] if apps.is_installed("shop"): from shop import views as shop_views urlpatterns += [ path("orders/", shop_views.account_order_list, name="orders"), path( "orders//", shop_views.account_order_detail, name="order_detail", ), ]