From 14b27fffac16f140abe3bc2fece08c0a06b68554 Mon Sep 17 00:00:00 2001 From: lalanza808 Date: Mon, 6 Jan 2020 15:45:03 -0800 Subject: [PATCH] add robots txt --- core/urls.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/urls.py b/core/urls.py index cb27023..8b6dcf2 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,9 +1,11 @@ from django.urls import path +from django.shortcuts import HttpResponse from . import views urlpatterns = [ path('', views.home, name='home'), + path('robots.txt', lambda x: HttpResponse("User-Agent: *\nDisallow: /", content_type="text/plain"), name="robots_file"), path('health/', views.health, name='health'), path('shipping/edit/', views.edit_shipping, name='edit_shipping'), ]