1
from django.urls import path
2
from django.views.decorators.cache import cache_page
3
from django.views.generic.base import RedirectView
5
from mainapp import views
6
from mainapp.apps import MainappConfig
8
app_name = MainappConfig.name
11
path('contacts/', views.ContactsView.as_view(), name='contacts'),
12
path('docsite/', views.DocSiteView.as_view(), name='docsite'),
13
path('login/', views.LoginView.as_view(), name='login'),
14
path('', views.IndexView.as_view(), name='home'),
15
path('yandex/', RedirectView.as_view(url='https://yandex.ru/search/', query_string=True), name='yandex'),
18
path('news/', views.NewsListView.as_view(), name='news'),
19
path('news/add/', views.NewsCreateView.as_view(), name='news_create'),
20
path('news/<int:pk>/update/', views.NewsUpdateView.as_view(), name='news_update'),
21
path('news/<int:pk>/delete/', views.NewsDeleteView.as_view(), name='news_delete'),
22
path('news/<int:pk>/detail/', views.NewsDetailView.as_view(), name='news_detail'),
27
path('courses/', views.CoursesListView.as_view(), name='courses'),
28
path('courses/<int:pk>/detail/', views.CourseDetailView.as_view(), name="courses_detail"),
29
path('courses/course_feedback/', views.CourseFeedbackFormView.as_view(), name="course_feedback"),
33
path('logs/', views.LogView.as_view(), name='logs_list'),
34
path('logs/download/', views.LogDownloadView.as_view(), name='logs_download'),