blob: d4406d548dfdd83410b2026c9a592a5c1cbc2067 (
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), rules={"*": ["/"]}
            ), content_type="text/plain"
        )
 
  |