mirror of https://github.com/zulip/zulip.git
portico: Move to corporate folder.
Since the URLs that use these function are present in corporate/urls, this file belongs in the corporate folder.
This commit is contained in:
parent
4b6df8a678
commit
21a2fd482e
|
@ -6,6 +6,14 @@ from django.views.generic import RedirectView, TemplateView
|
|||
|
||||
from corporate.views.billing_page import billing_home, update_plan
|
||||
from corporate.views.event_status import event_status, event_status_page
|
||||
from corporate.views.portico import (
|
||||
app_download_link_redirect,
|
||||
apps_view,
|
||||
hello_view,
|
||||
landing_view,
|
||||
plans_view,
|
||||
team_view,
|
||||
)
|
||||
from corporate.views.session import (
|
||||
start_card_update_stripe_session,
|
||||
start_retry_payment_intent_session,
|
||||
|
@ -14,14 +22,6 @@ from corporate.views.support import support_request
|
|||
from corporate.views.upgrade import initial_upgrade, sponsorship, upgrade
|
||||
from corporate.views.webhook import stripe_webhook
|
||||
from zerver.lib.rest import rest_path
|
||||
from zerver.views.portico import (
|
||||
app_download_link_redirect,
|
||||
apps_view,
|
||||
hello_view,
|
||||
landing_view,
|
||||
plans_view,
|
||||
team_view,
|
||||
)
|
||||
|
||||
i18n_urlpatterns: Any = [
|
||||
# Zephyr/MIT
|
||||
|
|
|
@ -379,7 +379,7 @@ class AboutPageTest(ZulipTestCase):
|
|||
self.assert_in_success_response(["2017-11-20"], result)
|
||||
self.assert_in_success_response(["timabbott", "showell", "gnprice", "rishig"], result)
|
||||
|
||||
with mock.patch("zerver.views.portico.open", side_effect=FileNotFoundError) as m:
|
||||
with mock.patch("corporate.views.portico.open", side_effect=FileNotFoundError) as m:
|
||||
result = self.client_get("/team/")
|
||||
self.assertEqual(result.status_code, 200)
|
||||
self.assert_in_success_response(["Never ran"], result)
|
||||
|
@ -556,7 +556,7 @@ class AppsPageTest(ZulipTestCase):
|
|||
def test_app_download_link_view(self) -> None:
|
||||
return_value = "https://desktop-download.zulip.com/v5.4.3/Zulip-Web-Setup-5.4.3.exe"
|
||||
with mock.patch(
|
||||
"zerver.views.portico.get_latest_github_release_download_link_for_platform",
|
||||
"corporate.views.portico.get_latest_github_release_download_link_for_platform",
|
||||
return_value=return_value,
|
||||
) as m:
|
||||
result = self.client_get("/apps/download/windows")
|
||||
|
|
|
@ -19,7 +19,6 @@ from zerver.lib.subdomains import get_subdomain
|
|||
from zerver.lib.user_counts import realm_user_count
|
||||
from zerver.lib.utils import statsd
|
||||
from zerver.models import PreregistrationUser, Realm, Stream, UserProfile
|
||||
from zerver.views.portico import hello_view
|
||||
|
||||
|
||||
def need_accept_tos(user_profile: Optional[UserProfile]) -> bool:
|
||||
|
@ -120,6 +119,9 @@ def home(request: HttpRequest) -> HttpResponse:
|
|||
and subdomain == Realm.SUBDOMAIN_FOR_ROOT_DOMAIN
|
||||
and settings.CORPORATE_ENABLED
|
||||
):
|
||||
|
||||
from corporate.views.portico import hello_view
|
||||
|
||||
return hello_view(request)
|
||||
|
||||
realm = get_realm_from_request(request)
|
||||
|
|
Loading…
Reference in New Issue