phantasmobile/app/views.py

22 lines
432 B
Python
Raw Normal View History

2023-07-25 19:06:14 +00:00
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')