From 91b357449549d3098f99a44f87030199bb0458d6 Mon Sep 17 00:00:00 2001 From: NikDizell Date: Sun, 8 Mar 2026 16:06:24 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=AF=D0=BD=D0=B4=D0=B5=D0=BA=D1=81=20=D0=B2=D0=B5=D0=B1=D0=BC?= =?UTF-8?q?=D0=B0=D1=81=D1=82=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/programmer/yandex_cdc16c33291495b9.html | 6 ++++++ programmer/urls.py | 3 ++- programmer/views.py | 8 ++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 programmer/templates/programmer/yandex_cdc16c33291495b9.html diff --git a/programmer/templates/programmer/yandex_cdc16c33291495b9.html b/programmer/templates/programmer/yandex_cdc16c33291495b9.html new file mode 100644 index 0000000..3a06352 --- /dev/null +++ b/programmer/templates/programmer/yandex_cdc16c33291495b9.html @@ -0,0 +1,6 @@ + + + + + Verification: cdc16c33291495b9 + \ No newline at end of file diff --git a/programmer/urls.py b/programmer/urls.py index 8b149c2..74592cb 100644 --- a/programmer/urls.py +++ b/programmer/urls.py @@ -24,13 +24,14 @@ urlpatterns = [ path('admin/statistics/', statistics_view, name='statistics'), # 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('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'), ] diff --git a/programmer/views.py b/programmer/views.py index d00ab98..006f85b 100644 --- a/programmer/views.py +++ b/programmer/views.py @@ -414,7 +414,11 @@ def statistics_view(request: HttpRequest) -> HttpResponse: @require_GET -def robots_txt(request: HttpRequest) -> HttpResponse: +def robots_txt(request): """Отдает 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')