-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a9445b
commit 6656b38
Showing
5 changed files
with
61 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
# home/urls.py | ||
|
||
from django.urls import path | ||
from django.contrib.auth.views import LoginView | ||
from . import views | ||
from django.contrib.auth.decorators import login_required | ||
|
||
urlpatterns = [ | ||
path('', views.homepage_view, name='homepage'), | ||
path('', login_required(views.homepage_view), name='homepage'), | ||
path('login/', views.login_view, name='login'), | ||
path('logout/', views.logout_view, name='logout'), | ||
path('change_password/', views.change_password, name='change_password'), | ||
path('change_password/', login_required(views.change_password), | ||
name='change_password'), | ||
] |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
from django.urls import re_path, path | ||
from django.contrib.auth.decorators import login_required | ||
|
||
from . import views, consumers | ||
|
||
urlpatterns = [ | ||
path('', views.tasks_list, name='task_list'), | ||
path('new/', views.task_create, name='task_create'), | ||
path('<int:pk>/edit/', views.task_edit, name='task_edit'), | ||
path('<int:pk>/delete/', views.task_delete, name='task_delete'), | ||
path('<int:pk>/view/', views.task_view, name='task_view'), | ||
path('<int:pk>/add_comment/', views.add_comment, name='add_comment'), | ||
path('', login_required(views.tasks_list), name='task_list'), | ||
path('new/', login_required(views.task_create), name='task_create'), | ||
path('<int:pk>/edit/', login_required(views.task_edit), name='task_edit'), | ||
path('<int:pk>/delete/', login_required(views.task_delete), name='task_delete'), | ||
path('<int:pk>/view/', login_required(views.task_view), name='task_view'), | ||
path('<int:pk>/add_comment/', | ||
login_required(views.add_comment), name='add_comment'), | ||
path('<int:pk>/delete_comment/<int:comment_id>/', | ||
views.delete_comment, name='delete_comment'), | ||
path('<int:pk>/add_file/', views.add_file, name='add_file'), | ||
# path('<int:pk>/save_checklist/', views.save_checklist, name='save_checklist'), | ||
path('download/<int:pk>/', views.download_file, name='download_file'), | ||
path('delete_file/<int:pk>/', views.delete_file, name='delete_file'), | ||
path('statistics/', views.task_statistics, name='statistics'), | ||
login_required(views.delete_comment), name='delete_comment'), | ||
path('<int:pk>/add_file/', login_required(views.add_file), name='add_file'), | ||
# path('<int:pk>/save_checklist/', login_required(views.save_checklist), name='save_checklist'), | ||
path('download/<int:pk>/', login_required(views.download_file), | ||
name='download_file'), | ||
path('delete_file/<int:pk>/', | ||
login_required(views.delete_file), name='delete_file'), | ||
path('statistics/', login_required(views.task_statistics), name='statistics'), | ||
# Добавьте эту строку для WebSocket маршрута | ||
re_path(r'ws/tasks/$', consumers.TaskConsumer.as_asgi()), | ||
] |