aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/views/wiki/robots_txt.py
blob: 308fe2a2485806a5842abd4d0246a9b1ff1b239e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from flask import Response, url_for

from pysite.base_route import RouteView


class RobotsTXT(RouteView):
    path = "/robots.txt"
    name = "robots_txt"

    def get(self):
        return Response(
            self.render(
                "robots.txt", sitemap_url=url_for("api.sitemap_xml", _external=True)
            ), content_type="text/plain"
        )