Add robots.txt
This commit is contained in:
parent
18349beeee
commit
28185736a3
2 changed files with 13 additions and 0 deletions
|
|
@ -259,3 +259,14 @@ class APIView(View):
|
|||
"title": "API Documentation",
|
||||
}
|
||||
return HttpResponse(content=template.render(context=context, request=request))
|
||||
|
||||
|
||||
class RobotsView(View):
|
||||
"""Robots.txt view."""
|
||||
|
||||
def get(self, request: HttpRequest) -> HttpResponse: # noqa: ARG002
|
||||
"""Load the robots.txt file."""
|
||||
return HttpResponse(
|
||||
content="""User-agent: *\nDisallow: /add\nDisallow: /upload\nDisallow: /accounts/""",
|
||||
content_type="text/plain",
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue