Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
terms: Rename and tweak FIRST_TIME_TERMS_OF_SERVICE_TEMPLATE.
Tim Abbott95854d9d94e7
diff --git a/templates/zerver/zulipchat_migration_tos.html b/templates/corporate/zulipchat_migration_tos.htmlsimilarity index 100%rename from templates/zerver/zulipchat_migration_tos.htmlrename to templates/corporate/zulipchat_migration_tos.htmldiff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.pyindex aeb16a37e41..b5d17f5d81e 100644--- a/zerver/tests/test_home.py+++ b/zerver/tests/test_home.py@@ -496,7 +496,7 @@ class HomeTest(ZulipTestCase):user.tos_version = Noneuser.save()- with self.settings(FIRST_TIME_TOS_TEMPLATE="hello.html"), self.settings(+ with self.settings(FIRST_TIME_TERMS_OF_SERVICE_TEMPLATE="zerver/hello.html"), self.settings(TERMS_OF_SERVICE_VERSION="99.99"):result = self.client_post("/accounts/accept_terms/")diff --git a/zerver/views/home.py b/zerver/views/home.pyindex ed187d451c6..6438e584489 100644--- a/zerver/views/home.py+++ b/zerver/views/home.py@@ -49,8 +49,11 @@ def accounts_accept_terms(request: HttpRequest) -> HttpResponse:email = request.user.delivery_emailspecial_message_template = None- if request.user.tos_version is None and settings.FIRST_TIME_TOS_TEMPLATE is not None:- special_message_template = "zerver/" + settings.FIRST_TIME_TOS_TEMPLATE+ if (+ request.user.tos_version is None+ and settings.FIRST_TIME_TERMS_OF_SERVICE_TEMPLATE is not None+ ):+ special_message_template = settings.FIRST_TIME_TERMS_OF_SERVICE_TEMPLATEreturn render(request,"zerver/accounts_accept_terms.html",diff --git a/zproject/default_settings.py b/zproject/default_settings.pyindex 1ce2d379872..43d2cb00231 100644--- a/zproject/default_settings.py+++ b/zproject/default_settings.py@@ -360,7 +360,7 @@ REALM_CREATION_LINK_VALIDITY_DAYS = 7# Zulip again on the web.TERMS_OF_SERVICE_VERSION: Optional[str] = None# Template to use when bumping TERMS_OF_SERVICE_VERSION to explain situation.-FIRST_TIME_TOS_TEMPLATE: Optional[str] = None+FIRST_TIME_TERMS_OF_SERVICE_TEMPLATE: Optional[str] = None# Hostname used for Zulip's statsd logging integration.STATSD_HOST = ""