add missing files

This commit is contained in:
j 2023-07-25 20:06:14 +01:00
commit a936246de9
4 changed files with 99 additions and 0 deletions

21
app/views.py Normal file
View file

@ -0,0 +1,21 @@
from django.shortcuts import render
from django.http import HttpResponse
def robots_txt(request):
txt = '''User-agent: *
Disallow:
'''
return HttpResponse(txt, 'text/plain')
txt = '''User-agent: *
Disallow:
Sitemap: {}
'''.format(request.build_absolute_uri('/sitemap.xml'))
return HttpResponse(txt, 'text/plain')
def sitemap_xml(request):
sitemap = ''
return HttpResponse(sitemap, 'application/xml')