Merge branch 'fix_test'
# Conflicts: # programmer/views.py
This commit is contained in:
commit
d5f53d9524
@ -24,7 +24,7 @@ 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'),
|
||||
|
||||
@ -417,6 +417,7 @@ def statistics_view(request: HttpRequest) -> HttpResponse:
|
||||
def robots_txt(request):
|
||||
"""Отдает robots.txt."""
|
||||
return render(request, 'programmer/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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user