Move robots.txt to static file instead of Django
This commit is contained in:
parent
d876b39b08
commit
ee8cc87196
5 changed files with 6 additions and 84 deletions
|
|
@ -34,7 +34,6 @@ def _reload_urls_with(**overrides) -> ModuleType:
|
|||
def test_top_level_named_routes_available() -> None:
|
||||
"""Top-level routes defined in `config.urls` are reversible."""
|
||||
assert reverse("sitemap") == "/sitemap.xml"
|
||||
assert reverse("robots") == "/robots.txt"
|
||||
# ensure the included `twitch` namespace is present
|
||||
assert reverse("twitch:dashboard") == "/"
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,7 @@ if TYPE_CHECKING:
|
|||
from django.urls.resolvers import URLResolver
|
||||
|
||||
urlpatterns: list[URLPattern | URLResolver] = [
|
||||
path("sitemap.xml", twitch_views.sitemap_view, name="sitemap"),
|
||||
path("robots.txt", twitch_views.robots_txt_view, name="robots"),
|
||||
path(route="sitemap.xml", view=twitch_views.sitemap_view, name="sitemap"),
|
||||
path(route="", view=include("twitch.urls", namespace="twitch")),
|
||||
]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue