From ef21f9107c7b3752d19c62db86f599caadd14fe8 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Tue, 16 Aug 2022 11:27:45 +0000 Subject: [PATCH] urls: Move /hello files to the corporate folder. --- corporate/views/portico.py | 2 +- templates/{zerver => corporate}/hello.html | 0 tools/linter_lib/custom_check.py | 2 +- zerver/tests/test_home.py | 6 +++--- 4 files changed, 5 insertions(+), 5 deletions(-) rename templates/{zerver => corporate}/hello.html (100%) diff --git a/corporate/views/portico.py b/corporate/views/portico.py index f3e5b729d8..9814294578 100644 --- a/corporate/views/portico.py +++ b/corporate/views/portico.py @@ -102,4 +102,4 @@ def landing_view(request: HttpRequest, template_name: str) -> HttpResponse: @add_google_analytics def hello_view(request: HttpRequest) -> HttpResponse: - return TemplateResponse(request, "zerver/hello.html", latest_info_context()) + return TemplateResponse(request, "corporate/hello.html", latest_info_context()) diff --git a/templates/zerver/hello.html b/templates/corporate/hello.html similarity index 100% rename from templates/zerver/hello.html rename to templates/corporate/hello.html diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py index 2b4445c44b..278274bacd 100644 --- a/tools/linter_lib/custom_check.py +++ b/tools/linter_lib/custom_check.py @@ -620,7 +620,7 @@ html_rules: List["Rule"] = [ "description": "Don't directly load dependencies from CDNs. See docs/subsystems/html-css.md", "exclude": { "templates/corporate/billing.html", - "templates/zerver/hello.html", + "templates/corporate/hello.html", "templates/corporate/upgrade.html", "templates/corporate/event_status.html", }, diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.py index f47a7553e2..7fe6b6580a 100644 --- a/zerver/tests/test_home.py +++ b/zerver/tests/test_home.py @@ -493,9 +493,9 @@ class HomeTest(ZulipTestCase): user.tos_version = None user.save() - with self.settings(FIRST_TIME_TERMS_OF_SERVICE_TEMPLATE="zerver/hello.html"), self.settings( - TERMS_OF_SERVICE_VERSION="99.99" - ): + with self.settings( + FIRST_TIME_TERMS_OF_SERVICE_TEMPLATE="corporate/hello.html" + ), self.settings(TERMS_OF_SERVICE_VERSION="99.99"): result = self.client_post("/accounts/accept_terms/") self.assertEqual(result.status_code, 200) self.assert_in_response("I agree to the", result)