Skip to content

Commit 90e7952

Browse files
authored
Merge pull request #67 from moscowpython/tech/new_titles
hello robots.txt
2 parents 2de9939 + 2b06141 commit 90e7952

File tree

6 files changed

+19
-3
lines changed

6 files changed

+19
-3
lines changed

landing_page/landing_page/urls.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66

77
urlpatterns = [
88
path('', include('mainpage.urls')),
9+
910
path('admin/', admin.site.urls),
11+
1012
path(
1113
"sitemap.xml",
1214
sitemap,
1315
{"sitemaps": {"static": LearnSitemap}},
1416
name="django.contrib.sitemaps.views.sitemap",
15-
)
17+
),
1618
]

landing_page/mainpage/templates/mainpage/advanced.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css"/>
2525
<link rel="stylesheet" href="{% static 'css/style.css' %}?v=1.6">
2626
<link rel="shortcut icon" href="{% static 'images/favicon.ico' %}">
27-
<title>Learn Python - Курсы Python онлайн</title>
27+
<title>Learn Python Advanced - продвинутые курсы Python онлайн</title>
2828

2929
{% include 'mainpage/include/common/counters.html' %}
3030
</head>

landing_page/mainpage/templates/mainpage/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css"/>
2525
<link rel="stylesheet" href="{% static 'css/style.css' %}?v=1.6">
2626
<link rel="shortcut icon" href="{% static 'images/favicon.ico' %}">
27-
<title>Learn Python - Курсы Python онлайн</title>
27+
<title>Learn Python - курсы Python онлайн</title>
2828

2929
{% include 'mainpage/include/common/counters.html' %}
3030
</head>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
User-agent: *
2+
Disallow: /admin/
3+
Disallow: /success/
4+
Sitemap: http://learn.python.ru/sitemap.xml
5+
Clean-param: *

landing_page/mainpage/urls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@
88

99
path('advanced/', views.advanced_handle, name='index_advanced'),
1010
path('advanced/success/', views.success_handle_advanced, name='success_advanced'),
11+
12+
path('robots.txt', views.robots_txt_handle, name='robots_txt'),
1113
]

landing_page/mainpage/views.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,10 @@ def success_handle_advanced(request: HttpRequest) -> HttpResponse:
5858
'enrollment': enrollment,
5959
},
6060
)
61+
62+
63+
def robots_txt_handle(request: HttpRequest) -> HttpResponse:
64+
return render(
65+
request,
66+
'mainpage/robots.txt',
67+
)

0 commit comments

Comments
 (0)