from django.urls import path from leads.views import (LeadListView, create_lead, LeadDetailView, update_lead, DeleteLeadView, convert_lead, GetLeadsView, AddCommentView, UpdateCommentView, DeleteCommentView, AddAttachmentsView, DeleteAttachmentsView, create_lead_from_site) app_name = 'leads' urlpatterns = [ path('list/', LeadListView.as_view(), name='list'), path('create/', create_lead, name='add_lead'), # create_lead_from_site path('create/from-site/', create_lead_from_site, name="create_lead_from_site"), path('<int:pk>/view/', LeadDetailView.as_view(), name="view_lead"), path('<int:pk>/edit/', update_lead, name="edit_lead"), path('<int:pk>/delete/', DeleteLeadView.as_view(), name="remove_lead"), path('<int:pk>/convert/', convert_lead, name="leads_convert"), path('get/list/', GetLeadsView.as_view(), name="get_lead"), path('comment/add/', AddCommentView.as_view(), name="add_comment"), path('comment/edit/', UpdateCommentView.as_view(), name="edit_comment"), path('comment/remove/', DeleteCommentView.as_view(), name="remove_comment"), path('attachment/add/', AddAttachmentsView.as_view(), name="add_attachment"), path('attachment/remove/', DeleteAttachmentsView.as_view(), name="remove_attachment"),
from django.urls import path from leads.views import (LeadListView, LeadDetailView, LeadCreateView, LeadUpdateView, LeadDeleteView, AssignNutritionistView, LeadCategoryUpdateView, CategoryListView, CategoryDetailView, CategoryCreateView, CategoryUpdateView, CategoryDeleteView, FollowUpCreateView, FollowUpUpdateView, FollowUpDeleteView) app_name = "leads" urlpatterns = [ path('', LeadListView.as_view(), name='lead-list'), path('<int:pk>/', LeadDetailView.as_view(), name='lead-detail'), path('<int:pk>/update/', LeadUpdateView.as_view(), name='lead-update'), path('<int:pk>/delete/', LeadDeleteView.as_view(), name='lead-delete'), path('create/', LeadCreateView.as_view(), name='lead-create'), path('<int:pk>/assign-nutritionist/', AssignNutritionistView.as_view(), name='assign-nutritionist'), path('<int:pk>/category/', LeadCategoryUpdateView.as_view(), name='lead-category-update'), path('<int:pk>/followups/create/', FollowUpCreateView.as_view(), name='lead-followup-create'), path('followups/<int:pk>/', FollowUpUpdateView.as_view(), name='lead-followup-update'), path('followups/<int:pk>/delete', FollowUpDeleteView.as_view(),
Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.contrib.auth.views import ( LoginView, LogoutView, PasswordResetView, PasswordResetDoneView, PasswordResetConfirmView, PasswordResetCompleteView ) from django.urls import path, include from leads.views import LeadListView from authentication.views import SignupView urlpatterns = [ path('', LeadListView.as_view()), path('admin/', admin.site.urls), path('leads/', include('leads.urls', namespace='leads')), path('agents/', include('agents.urls', namespace='agents')), path('login/', LoginView.as_view(), name='login'), path('logout/', LogoutView.as_view(), name='logout'), path('signup/', SignupView.as_view(), name='signup'), path('reset-password/', PasswordResetView.as_view(), name='reset-password'), path('password-reset-done/', PasswordResetDoneView.as_view(), name="password_reset_done"), path('password-reset-confirm/<uidb64>/<token>/', PasswordResetConfirmView.as_view(), name="password_reset_confirm"), path('password-reset-complete/', PasswordResetCompleteView.as_view(), name="password_reset_complete") ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
from leads.views import ( LeadListView, LeadDetailView, LeadCreateView, LeadUpdateView, LeadDeleteView, AssignedAgentView, CategoryListView, CategoryDetailView, LeadCategoryUpdateView, ) app_name = "leads" urlpatterns = [ path('', LeadListView.as_view(), name="lead_list"), path('<int:pk>/', LeadDetailView.as_view(), name="lead_detail"), path('<int:pk>/update', LeadUpdateView.as_view(), name="lead_update"), path('<int:pk>/delete', LeadDeleteView.as_view(), name="lead_delete"), path('<int:pk>/assign-agent/', AssignedAgentView.as_view(), name="assign_agent"), path('<int:pk>/category/', LeadCategoryUpdateView.as_view(), name="lead_category_update"), path('create/', LeadCreateView.as_view(), name="lead_create"), path('categories/', CategoryListView.as_view(), name='category_list'), path('categories/<int:pk>/', CategoryDetailView.as_view(), name='category_detail'), ]