Files
Django_TasksApp/main/planner/urls.py
T

53 lines
3.4 KiB
Python

from django.contrib.auth import views as auth_views
from django.urls import path
from .health_exports import export_bowel_csv, export_pain_csv
from .views import (
DailyPlannerView, HealthView, TaskCreateView, category_suggestions, TaskDeleteView, TaskDetailView, TaskListView,
TaskUpdateView, WorkoutCreateView, WorkoutUpdateView, delete_workout, fasting_configure, neck_headache_checkin_panel,
fasting_toggle_tracking, fasting_widget, logout_view, register, toggle_task_active, toggle_task_completed,
save_neck_headache_checkin, save_sleep_checkin, advance_onboarding, toggle_workout_completed, user_settings, workout_today,
bowel_health_panel, save_bowel_health_checkin, toggle_tooth_brushing, hydration_add, hydration_undo, test_ntfy, gitea_activity,
)
app_name = 'planner'
urlpatterns = [
path('', TaskListView.as_view(), name='task-list'),
path('health/', HealthView.as_view(), name='health'),
path('login/', auth_views.LoginView.as_view(template_name='registration/login.html'), name='login'),
path('register/', register, name='register'),
path('logout/', logout_view, name='logout'),
path('settings/', user_settings, name='user-settings'),
path('settings/notifications/ntfy/test/', test_ntfy, name='ntfy-test'),
path('gitea/activity/', gitea_activity, name='gitea-activity'),
path('onboarding/advance/', advance_onboarding, name='onboarding-advance'),
path('daily/', DailyPlannerView.as_view(), name='daily-planner'),
path('fasting/widget/', fasting_widget, name='fasting-widget'),
path('fasting/configure/', fasting_configure, name='fasting-configure'),
path('fasting/toggle/', fasting_toggle_tracking, name='fasting-toggle'),
path('check-ins/panel/', neck_headache_checkin_panel, name='neck-headache-checkin-panel'),
path('check-ins/save/', save_neck_headache_checkin, name='neck-headache-checkin-save'),
path('sleep-check-ins/save/', save_sleep_checkin, name='sleep-checkin-save'),
path('teeth/toggle/', toggle_tooth_brushing, name='tooth-brushing-toggle'),
path('hydration/add/', hydration_add, name='hydration-add'),
path('hydration/undo/', hydration_undo, name='hydration-undo'),
path('bowel-health/panel/', bowel_health_panel, name='bowel-health-panel'),
path('bowel-health/save/', save_bowel_health_checkin, name='bowel-health-save'),
path('check-ins/export/<str:period>/', export_pain_csv, name='pain-export'),
path('bowel-health/export/<str:period>/', export_bowel_csv, name='bowel-export'),
path('workouts/today/', workout_today, name='workout-today'),
path('workouts/new/', WorkoutCreateView.as_view(), name='workout-create'),
path('workouts/<int:pk>/edit/', WorkoutUpdateView.as_view(), name='workout-update'),
path('workouts/<int:pk>/toggle-completed/', toggle_workout_completed, name='workout-toggle-completed'),
path('workouts/<int:pk>/delete/', delete_workout, name='workout-delete'),
path('tasks/categories/', category_suggestions, name='category-suggestions'),
path('tasks/new/', TaskCreateView.as_view(), name='task-create'),
path('tasks/<int:pk>/', TaskDetailView.as_view(), name='task-detail'),
path('tasks/<int:pk>/edit/', TaskUpdateView.as_view(), name='task-update'),
path('tasks/<int:pk>/delete/', TaskDeleteView.as_view(), name='task-delete'),
path('tasks/<int:pk>/toggle-active/', toggle_task_active, name='task-toggle-active'),
path('tasks/<int:pk>/toggle-completed/', toggle_task_completed, name='task-toggle-completed'),
]