add robots.txt
This commit is contained in:
@@ -20,12 +20,14 @@ from django.conf import settings
|
|||||||
from django.conf.urls.static import static
|
from django.conf.urls.static import static
|
||||||
from django.views.generic import RedirectView
|
from django.views.generic import RedirectView
|
||||||
from django.http import JsonResponse
|
from django.http import JsonResponse
|
||||||
|
from . import views
|
||||||
def healthcheck(request):
|
def healthcheck(request):
|
||||||
return JsonResponse({'status': True})
|
return JsonResponse({'status': True})
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('', RedirectView.as_view(url='admin/login/', permanent=False), name='/'),
|
path('', RedirectView.as_view(url='admin/login/', permanent=False), name='/'),
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
|
path('robots.txt', views.robots_txt),
|
||||||
path('accounts/', admin.site.urls),
|
path('accounts/', admin.site.urls),
|
||||||
path('collabs/', include('collabs.urls')),
|
path('collabs/', include('collabs.urls')),
|
||||||
path('vehicules/', include('vehicles.urls')),
|
path('vehicules/', include('vehicles.urls')),
|
||||||
|
|||||||
4
Reskreen/views.py
Normal file
4
Reskreen/views.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
from django.http import HttpResponse
|
||||||
|
|
||||||
|
def robots_txt(request):
|
||||||
|
return HttpResponse("User-agent: *\nDisallow: /\n", content_type="text/plain")
|
||||||
Reference in New Issue
Block a user