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
16
hub/urls.py
16
hub/urls.py
|
@ -42,14 +42,6 @@ urlpatterns = [
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
path("", include("hub.services.urls")),
|
path("", include("hub.services.urls")),
|
||||||
path("broker/", include("hub.broker.urls", namespace="broker")),
|
path("broker/", include("hub.broker.urls", namespace="broker")),
|
||||||
]
|
|
||||||
if settings.DEBUG:
|
|
||||||
urlpatterns += [
|
|
||||||
path("__reload__/", include("django_browser_reload.urls")),
|
|
||||||
path("schema-viewer/", include("schema_viewer.urls")),
|
|
||||||
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(
|
path(
|
||||||
"sitemap.xml",
|
"sitemap.xml",
|
||||||
sitemap,
|
sitemap,
|
||||||
|
@ -58,4 +50,12 @@ if settings.DEBUG:
|
||||||
),
|
),
|
||||||
path("robots.txt", robots_txt, name="robots_txt"),
|
path("robots.txt", robots_txt, name="robots_txt"),
|
||||||
]
|
]
|
||||||
|
if settings.DEBUG:
|
||||||
|
urlpatterns += [
|
||||||
|
path("__reload__/", include("django_browser_reload.urls")),
|
||||||
|
path("schema-viewer/", include("schema_viewer.urls")),
|
||||||
|
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"),
|
||||||
|
]
|
||||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue