Добавил Яндекс вебмастер

This commit is contained in:
NikDizell 2026-03-08 16:06:24 +03:00
parent ce76c093d1
commit 91b3574495
3 changed files with 14 additions and 3 deletions

View File

@ -0,0 +1,6 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>Verification: cdc16c33291495b9</body>
</html>

View File

@ -24,13 +24,14 @@ urlpatterns = [
path('admin/statistics/', statistics_view, name='statistics'), path('admin/statistics/', statistics_view, name='statistics'),
# Sitemap # Sitemap
path('sitemap.xml', sitemap, {'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap'), path('sitemap.xml', sitemap, {'sitemaps': sitemaps}, name='django.contrib.sitemaps.views.sitemap'),
path('robots.txt', robots_txt, name='robots'), path('robots.txt', views.robots_txt, name='robots'),
path('login/', auth_views.LoginView.as_view(template_name='programmer/login.html'), name='login'), path('login/', auth_views.LoginView.as_view(template_name='programmer/login.html'), name='login'),
path('logout/', auth_views.LogoutView.as_view(), name='logout'), path('logout/', auth_views.LogoutView.as_view(), name='logout'),
path('register/', views.RegisterView.as_view(), name='register'), path('register/', views.RegisterView.as_view(), name='register'),
path('profile/', views.ProfileView.as_view(), name='profile'), path('profile/', views.ProfileView.as_view(), name='profile'),
path('profile/edit/', views.ProfileEditView.as_view(), name='profile_edit'), path('profile/edit/', views.ProfileEditView.as_view(), name='profile_edit'),
path('privacy/', PrivacyPolicyView.as_view(), name='privacy'), path('privacy/', PrivacyPolicyView.as_view(), name='privacy'),
path('yandex_cdc16c33291495b9.html/', yandex_html, name='yandex_cdc16c33291495b9'),
] ]

View File

@ -414,7 +414,11 @@ def statistics_view(request: HttpRequest) -> HttpResponse:
@require_GET @require_GET
def robots_txt(request: HttpRequest) -> HttpResponse: def robots_txt(request):
"""Отдает robots.txt.""" """Отдает robots.txt."""
return render(request, 'robots.txt', content_type='text/plain') return render(request, 'programmer/robots.txt', content_type='text/plain; charset=utf-8')
@require_GET
def yandex_html(request: HttpRequest) -> HttpResponse:
"""Отдает yandex_cdc16c33291495b9.html."""
return render(request, 'programmer/yandex_cdc16c33291495b9.html', content_type='text/html')