add missing files
This commit is contained in:
parent
0b64fd58a1
commit
a936246de9
4 changed files with 99 additions and 0 deletions
21
app/views.py
Normal file
21
app/views.py
Normal 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')
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue