move robots and sitemap into prod urls
This commit is contained in:
parent
a07d1fc4e2
commit
cd65a149e5
1 changed files with 7 additions and 7 deletions
14
hub/urls.py
14
hub/urls.py
|
@ -42,6 +42,13 @@ urlpatterns = [
|
|||
path("admin/", admin.site.urls),
|
||||
path("", include("hub.services.urls")),
|
||||
path("broker/", include("hub.broker.urls", namespace="broker")),
|
||||
path(
|
||||
"sitemap.xml",
|
||||
sitemap,
|
||||
{"sitemaps": sitemaps},
|
||||
name="django.contrib.sitemaps.views.sitemap",
|
||||
),
|
||||
path("robots.txt", robots_txt, name="robots_txt"),
|
||||
]
|
||||
if settings.DEBUG:
|
||||
urlpatterns += [
|
||||
|
@ -50,12 +57,5 @@ if settings.DEBUG:
|
|||
path("test-400/", lambda request: render(request, "400.html"), name="test_400"),
|
||||
path("test-404/", lambda request: render(request, "404.html"), name="test_404"),
|
||||
path("test-500/", lambda request: render(request, "500.html"), name="test_500"),
|
||||
path(
|
||||
"sitemap.xml",
|
||||
sitemap,
|
||||
{"sitemaps": sitemaps},
|
||||
name="django.contrib.sitemaps.views.sitemap",
|
||||
),
|
||||
path("robots.txt", robots_txt, name="robots_txt"),
|
||||
]
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue