From 0e07c50c18f6ba0e7ba140d9aaafa6f101b0baf4 Mon Sep 17 00:00:00 2001 From: FreneticScribbler Date: Mon, 22 Feb 2021 23:41:58 +0000 Subject: [PATCH] Prevent search engines indexing us Might help cut down the spam --- PyRIGS/urls.py | 1 + templates/index.html | 2 +- templates/robots.txt | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 templates/robots.txt diff --git a/PyRIGS/urls.py b/PyRIGS/urls.py index 73f80bc8..00794415 100644 --- a/PyRIGS/urls.py +++ b/PyRIGS/urls.py @@ -27,6 +27,7 @@ urlpatterns = [ path('', include('users.urls')), path('admin/', admin.site.urls), + path("robots.txt", TemplateView.as_view(template_name="robots.txt", content_type="text/plain")), ] if settings.DEBUG: diff --git a/templates/index.html b/templates/index.html index 137899a9..bf95f4c4 100644 --- a/templates/index.html +++ b/templates/index.html @@ -33,7 +33,7 @@ TEC Forum TEC Wiki {% if perms.RIGS.view_event %} - Price List + Price List {% endif %} diff --git a/templates/robots.txt b/templates/robots.txt new file mode 100644 index 00000000..1f53798b --- /dev/null +++ b/templates/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /