Site/programmer/urls.py

43 lines
2.2 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from .views import *
from django.contrib.sitemaps.views import sitemap
from .sitemaps import sitemaps
from blog.views import ArticleListView
from django.contrib.auth import views as auth_views
from . import views
urlpatterns = [
path('', views.HomePageView.as_view(), name='home'),
path('about/', views.AboutPageView.as_view(), name='about'),
path('solutions/', views.SolutionListView.as_view(), name='solution'),
path('solutions/<slug:slug>/', SolutionDetailView.as_view(), name='solution_detail'),
# path('competence/', ability, name='ability'),
# path('competence/<int:pk>/', CompetenceDetailView.as_view(), name='competence_detail'),
path('recall/', views.RecallListView.as_view(), name='recall'),
path('recalls/<int:pk>/', RecallDetailView.as_view(), name='recall_detail'),
path('blog/', ArticleListView.as_view(), name='blog'),
path('callback/', callback_request, name='callback'),
path('admin/statistics/', statistics_view, name='statistics'),
# Sitemap
path('sitemap.xml', sitemap, {'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap'),
path('robots.txt', views.robots_txt, name='robots'),
path('login/', auth_views.LoginView.as_view(template_name='programmer/login.html',
extra_context={'title': 'Вход | СНА Технологии'}),
name='login'),
path('logout/', auth_views.LogoutView.as_view(), name='logout'),
path('register/', views.RegisterView.as_view(), name='register'),
path('profile/', views.ProfileView.as_view(), name='profile'),
path('profile/edit/', views.ProfileEditView.as_view(), name='profile_edit'),
path('privacy/', PrivacyPolicyView.as_view(), name='privacy'),
path('yandex_cdc16c33291495b9.html/', yandex_html, name='yandex_cdc16c33291495b9'),
path('requisites/', RequisitesPageView.as_view(), name='requisites'),
]
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)