from django.urls import path from webapp.views import IndexView, TaskView, TaskUpdateView, TaskDeleteView, ProjectListView, \ ProjectView, ProjectCreateView, ProjectUpdateView, ProjectDeleteView, ProjectTaskCreateView, ProjectUserView app_name = 'webapp' urlpatterns = [ path('tasks', IndexView.as_view(), name='index'), path('task/<int:pk>/', TaskView.as_view(), name='task_view'), path('task/<int:pk>/update/', TaskUpdateView.as_view(), name='task_update'), path('task/<int:pk>/delete/', TaskDeleteView.as_view(), name='task_delete'), path('', ProjectListView.as_view(), name='project_list'), path('project/<int:pk>/', ProjectView.as_view(), name='project_view'), path('project/add/', ProjectCreateView.as_view(), name='project_create'), path('project/<int:pk>/update/', ProjectUpdateView.as_view(), name='project_update'), path('project/<int:pk>/delete/', ProjectDeleteView.as_view(), name='project_delete'), path('project/<int:pk>/tasks/add', ProjectTaskCreateView.as_view(), name='task_create'), path('project/<int:pk>/user/', ProjectUserView.as_view(), name='project_user'), ]
from django.urls import path from webapp.views import (IndexView, TracerView, TracerDeleteView, TracerUpdateView, ProjectTracerCreate, ProjectCreateView, ProjectIndexView, ProjectView, ProjectDeleteView, ProjectUpdateView, UserUpdateView) app_name = 'project' urlpatterns = [ path('tracers/', IndexView.as_view(), name='list'), path('<int:pk>/', TracerView.as_view(), name='view'), path('<int:pk>/update/', TracerUpdateView.as_view(), name='update'), path('<int:pk>/delete/', TracerDeleteView.as_view(), name='delete'), path('user/<int:pk>', UserUpdateView.as_view(), name="user_update"), path('project/add/', ProjectCreateView.as_view(), name='project_add'), path('project_tracer/<int:pk>/add/', ProjectTracerCreate.as_view(), name='project_tracer_add'), path('', ProjectIndexView.as_view(), name='project_list'), path('project/<int:pk>/', ProjectView.as_view(), name='project_view'), path('project/<int:pk>/update/', ProjectUpdateView.as_view(), name='project_update'), path('project/<int:pk>/delete/', ProjectDeleteView.as_view(), name='project_delete'), ]
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static from webapp.views import IndexView,CreateTodoView, DeleteTodoView, WatchTodoView, UpdateTodoView, Project_view, \ Watch_project_view, Create_project_view,ProjectToDoCreateView, ProjectUpdateView, ProjectDeleteView, ManageTeamView from django.contrib.auth.views import LogoutView, LoginView urlpatterns = [ path('admin/', admin.site.urls), path('', Project_view.as_view(), name='index_view'), path('add/', CreateTodoView.as_view(), name='add'), path('todo/<int:pk>/', WatchTodoView.as_view(), name='watch_todo'), path('todo/<int:pk>/delete/', DeleteTodoView.as_view(), name='delete_todo'), path('todo/<int:pk>/update/', UpdateTodoView.as_view(), name='update_todo'), path('projects/', Project_view.as_view(), name='projects'), path('projects/<int:pk>/', Watch_project_view.as_view(), name='watch_project'), path('projects/add/', Create_project_view.as_view(), name='add project'), path('projects/<int:pk>/to_do_action/add/', ProjectToDoCreateView.as_view(), name='project_todo_add'), path('projects/<int:pk>/update/', ProjectUpdateView.as_view(), name='update_project'), path('projects/<int:pk>/manage_team/', ManageTeamView.as_view(), name='manage_team'), path('projects/<int:pk>/delete/', ProjectDeleteView.as_view(), name='delete_project'), path('accounts/', include('accounts.urls')), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)