Exemple #1
0
from webapp.views.task_views import TasksDelete, TaskForProjectCreateView
from webapp.views.type_views import TypeDelete

urlpatterns = [
    path('', IndexView.as_view(), name='index'),
    path('task/<int:pk>/', TaskView.as_view(), name='task_view'),
    # path('task/add/', TaskCreateView.as_view(), name='task_create'),
    path('task/<int:pk>/edit/', TaskUpdateView.as_view(), name='task_update'),
    path('task/<int:pk>/delete/', TaskDeleteView.as_view(),
         name='task_delete'),
    path('massdelete/', TasksDelete.as_view(), name='mass_delete'),
    path('types/', TypeView.as_view(), name='types_view'),
    path('types/add/', TypeCreateView.as_view(), name='type_create'),
    path('types/<int:pk>/edit/', TypeUpdateView.as_view(), name='type_update'),
    path('types/<int:pk>/delete/',
         TypeDeleteView.as_view(),
         name='type_delete'),
    path('massdeletetypes/', TypeDelete.as_view(), name='mass_delete_types'),
    path('statuses/', StatusView.as_view(), name='status_view'),
    path('status/add/', StatusCreateView.as_view(), name='status_create'),
    path('status/<int:pk>/edit/',
         StatusUpdateView.as_view(),
         name='status_update'),
    path('status/<int:pk>/delete/',
         StatusDeleteView.as_view(),
         name='status_delete'),
    path('massdeletestatus/',
         StatusDelete.as_view(),
         name='mass_delete_status'),
    path('projects/', ProjectsListView.as_view(), name='projects_view'),
    path('project/<int:pk>/', ProjectView.as_view(), name='project_view'),
Exemple #2
0
urlpatterns = [
    path('', IndexView.as_view(), name='index'),
    path('task/<int:pk>', TaskView.as_view(), name='task_view'),
    path('task/create/', TaskCreateView.as_view(), name='task_create'),
    path('task/<int:pk>/edit/', TaskUpdateView.as_view(), name='task_update'),
    path('task/<int:pk>/delete/', TaskDeleteView.as_view(),
         name='task_delete'),
    path('status/', StatusIndexView.as_view(), name='status_index'),
    path('status/create/', StatusCreateView.as_view(), name='status_create'),
    path('status/<int:pk>/edit/',
         StatusUpdateView.as_view(),
         name='status_update'),
    path('status/<int:pk>/delete',
         StatusDeleteView.as_view(),
         name='status_delete'),
    path('type/', TypeIndexView.as_view(), name='type_index'),
    path('type/create/', TypeCreateView.as_view(), name='type_create'),
    path('type/<int:pk>/edit/', TypeUpdateView.as_view(), name='type_update'),
    path('type/<int:pk>/delete', TypeDeleteView.as_view(), name='type_delete'),
    path('project/', ProjectIndexView.as_view(), name='project_index'),
    path('project/<int:pk>', ProjectView.as_view(), name='project_view'),
    path('project/create/', ProjectCreateView.as_view(),
         name='project_create'),
    path('project/<int:pk>/edit/',
         ProjectUpdateView.as_view(),
         name='project_update'),
    path('project/<int:pk>/delete',
         ProjectDeleteView.as_view(),
         name='project_delete'),
]
"""
from django.contrib import admin
from django.urls import path
from webapp.views import IndexView, TaskCreateView, TaskUpdateView, TaskDeleteView, TaskView, StatusList, StatusCreateView, StatusDeleteView, StatusUpdateView, TypeList, TypeCreateView, TypeUpdateView, TypeDeleteView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', IndexView.as_view(), name='index'),
    path('article/<int:pk>/', TaskView.as_view(), name='task_view'),
    path('articles/add/', TaskCreateView.as_view(), name='task_add'),
    path('article/<int:pk>/edit/',
         TaskUpdateView.as_view(),
         name='task_update'),
    path('article/<int:pk>/delete/',
         TaskDeleteView.as_view(),
         name='task_delete'),
    path('status/', StatusList.as_view(), name='status_list'),
    path('statuses/add/', StatusCreateView.as_view(), name='status_add'),
    path('status/<int:pk>/edit/',
         StatusUpdateView.as_view(),
         name='status_update'),
    path('status/<int:pk>/delete/',
         StatusDeleteView.as_view(),
         name='status_delete'),
    path('type/', TypeList.as_view(), name='type_list'),
    path('types/add/', TypeCreateView.as_view(), name='type_add'),
    path('type/<int:pk>/edit/', TypeUpdateView.as_view(), name='type_update'),
    path('type/<int:pk>/delete/', TypeDeleteView.as_view(),
         name='type_delete'),
]