mirror of https://github.com/zulip/zulip.git
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:
parent
f758ca596b
commit
6ad777c86f
|
@ -505,6 +505,7 @@ def write_instrumentation_reports(full_suite: bool, include_webhooks: bool) -> N
|
|||
"config-error/(?P<error_name>[^/]+)",
|
||||
"confirmation_key/",
|
||||
"node-coverage/(?P<path>.+)",
|
||||
"docs/",
|
||||
"docs/(?P<path>.+)",
|
||||
"casper/(?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.response import FileResponse
|
||||
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 zerver.views.auth import login_page
|
||||
|
@ -52,6 +52,7 @@ urls = [
|
|||
"show_indexes": True,
|
||||
},
|
||||
),
|
||||
path("docs/", RedirectView.as_view(url="/docs/index.html")),
|
||||
path(
|
||||
"docs/<path:path>",
|
||||
serve,
|
||||
|
|
Loading…
Reference in New Issue