From 2e84770b0ffceb5a0b6fd3c444cc899f2243f695 Mon Sep 17 00:00:00 2001 From: Jim Laney Date: Thu, 11 Apr 2024 09:36:19 -0700 Subject: [PATCH] add robots.txt file --- compass/templates/robots.txt | 2 ++ compass/urls.py | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 compass/templates/robots.txt diff --git a/compass/templates/robots.txt b/compass/templates/robots.txt new file mode 100644 index 00000000..1f53798b --- /dev/null +++ b/compass/templates/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / diff --git a/compass/urls.py b/compass/urls.py index 8b50d19c..d2f83fbd 100644 --- a/compass/urls.py +++ b/compass/urls.py @@ -59,6 +59,8 @@ ] urlpatterns += [ + re_path(r"^robots\.txt$", TemplateView.as_view( + template_name="robots.txt", content_type="text/plain")), re_path(r"^admin", admin_site.urls), re_path( r"^unauthorized-user$",