mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
dev_urls: Make requests to /docs redirect to the index.
This makes it easier to browse to the docs in development mode, and more closely matches ReadTheDocs production.
This commit is contained in:
committed by
Tim Abbott
parent
f758ca596b
commit
6ad777c86f
@@ -505,6 +505,7 @@ def write_instrumentation_reports(full_suite: bool, include_webhooks: bool) -> N
|
|||||||
"config-error/(?P<error_name>[^/]+)",
|
"config-error/(?P<error_name>[^/]+)",
|
||||||
"confirmation_key/",
|
"confirmation_key/",
|
||||||
"node-coverage/(?P<path>.+)",
|
"node-coverage/(?P<path>.+)",
|
||||||
|
"docs/",
|
||||||
"docs/(?P<path>.+)",
|
"docs/(?P<path>.+)",
|
||||||
"casper/(?P<path>.+)",
|
"casper/(?P<path>.+)",
|
||||||
"static/(?P<path>.+)",
|
"static/(?P<path>.+)",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from django.contrib.staticfiles.views import serve as staticfiles_serve
|
|||||||
from django.http.request import HttpRequest
|
from django.http.request import HttpRequest
|
||||||
from django.http.response import FileResponse
|
from django.http.response import FileResponse
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
from django.views.generic import TemplateView
|
from django.views.generic import RedirectView, TemplateView
|
||||||
from django.views.static import serve
|
from django.views.static import serve
|
||||||
|
|
||||||
from zerver.views.auth import login_page
|
from zerver.views.auth import login_page
|
||||||
@@ -52,6 +52,7 @@ urls = [
|
|||||||
"show_indexes": True,
|
"show_indexes": True,
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
path("docs/", RedirectView.as_view(url="/docs/index.html")),
|
||||||
path(
|
path(
|
||||||
"docs/<path:path>",
|
"docs/<path:path>",
|
||||||
serve,
|
serve,
|
||||||
|
|||||||
Reference in New Issue
Block a user