Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
docs: Change /doc-permalinks/ redirects to point to /stable/ RTD.
Mateusz Mandera1c57e04cc1df
diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.pyindex 9cfe4d0cc1f..a77d92abe1d 100644--- a/zerver/tests/test_home.py+++ b/zerver/tests/test_home.py@@ -1498,21 +1498,21 @@ class TestDocRedirectView(ZulipTestCase):self.assertEqual(result.status_code, 302)self.assertEqual(result["Location"],- "https://zulip.readthedocs.io/en/latest/production/mobile-push-notifications.html#uploading-usage-statistics",+ "https://zulip.readthedocs.io/en/stable/production/mobile-push-notifications.html#uploading-usage-statistics",)result = self.client_get("/doc-permalinks/basic-metadata")self.assertEqual(result.status_code, 302)self.assertEqual(result["Location"],- "https://zulip.readthedocs.io/en/latest/production/mobile-push-notifications.html#uploading-basic-metadata",+ "https://zulip.readthedocs.io/en/stable/production/mobile-push-notifications.html#uploading-basic-metadata",)result = self.client_get("/doc-permalinks/why-service")self.assertEqual(result.status_code, 302)self.assertEqual(result["Location"],- "https://zulip.readthedocs.io/en/latest/production/mobile-push-notifications.html#why-a-push-notification-service-is-necessary",+ "https://zulip.readthedocs.io/en/stable/production/mobile-push-notifications.html#why-a-push-notification-service-is-necessary",)result = self.client_get("/doc-permalinks/registration-transfer")diff --git a/zerver/views/home.py b/zerver/views/home.pyindex 0d01fcdf2ee..a1044198e12 100644--- a/zerver/views/home.py+++ b/zerver/views/home.py@@ -270,9 +270,9 @@ def desktop_home(request: HttpRequest) -> HttpResponse:def doc_permalinks_view(request: HttpRequest, doc_id: str) -> HttpResponse:DOC_PERMALINK_MAP: dict[str, str] = {- "usage-statistics": "https://zulip.readthedocs.io/en/latest/production/mobile-push-notifications.html#uploading-usage-statistics",- "basic-metadata": "https://zulip.readthedocs.io/en/latest/production/mobile-push-notifications.html#uploading-basic-metadata",- "why-service": "https://zulip.readthedocs.io/en/latest/production/mobile-push-notifications.html#why-a-push-notification-service-is-necessary",+ "usage-statistics": "https://zulip.readthedocs.io/en/stable/production/mobile-push-notifications.html#uploading-usage-statistics",+ "basic-metadata": "https://zulip.readthedocs.io/en/stable/production/mobile-push-notifications.html#uploading-basic-metadata",+ "why-service": "https://zulip.readthedocs.io/en/stable/production/mobile-push-notifications.html#why-a-push-notification-service-is-necessary","registration-transfer": "https://zulip.readthedocs.io/en/latest/production/mobile-push-notifications.html#moving-your-registration-to-a-new-server",}