web: Save a needless 301 redirect from /plans to /plans/.

This commit is contained in:
Alex Vandiver 2023-03-23 02:53:14 +00:00 committed by Tim Abbott
parent bf06d493ee
commit c686c5ed0f
16 changed files with 29 additions and 29 deletions

View File

@ -60,9 +60,9 @@ def plans_view(request: HttpRequest) -> HttpResponse:
if realm is not None: if realm is not None:
if realm.plan_type == Realm.PLAN_TYPE_SELF_HOSTED and settings.PRODUCTION: if realm.plan_type == Realm.PLAN_TYPE_SELF_HOSTED and settings.PRODUCTION:
return HttpResponseRedirect("https://zulip.com/plans") return HttpResponseRedirect("https://zulip.com/plans/")
if not request.user.is_authenticated: if not request.user.is_authenticated:
return redirect_to_login(next="/plans") return redirect_to_login(next="/plans/")
if request.user.is_guest: if request.user.is_guest:
return TemplateResponse(request, "404.html", status=404) return TemplateResponse(request, "404.html", status=404)
customer = get_customer_by_realm(realm) customer = get_customer_by_realm(realm)

View File

@ -146,7 +146,7 @@ browsers will experience weird/confusing redirects.
## Open realm creation ## Open realm creation
Installations like [Zulip Cloud](https://zulip.com/plans) that wish to Installations like [Zulip Cloud](https://zulip.com/plans/) that wish to
allow anyone on the Internet to create new Zulip organizations can do allow anyone on the Internet to create new Zulip organizations can do
so by setting `OPEN_REALM_CREATION = True` in so by setting `OPEN_REALM_CREATION = True` in
`/etc/zulip/settings.py`. Note that offering Zulip hosting to anyone `/etc/zulip/settings.py`. Note that offering Zulip hosting to anyone

View File

@ -20,7 +20,7 @@ Zulip's system supports:
period. period.
In Zulip Cloud, message retention policies are available on the Zulip In Zulip Cloud, message retention policies are available on the Zulip
Cloud Standard and Zulip Cloud Plus [plans](https://zulip.com/plans), Cloud Standard and Zulip Cloud Plus [plans](https://zulip.com/plans/),
as well as for the hundreds of communities with sponsored Cloud as well as for the hundreds of communities with sponsored Cloud
Standard hosting. Standard hosting.

View File

@ -1,7 +1,7 @@
# Zulip Cloud billing # Zulip Cloud billing
This page answers some frequently asked questions about [Zulip Cloud plans and This page answers some frequently asked questions about [Zulip Cloud plans and
pricing](https://zulip.com/plans). If you have any other questions, please don't hesitate to pricing](https://zulip.com/plans/). If you have any other questions, please don't hesitate to
reach out at sales@zulip.com. reach out at sales@zulip.com.
## Differences between Zulip Cloud plans ## Differences between Zulip Cloud plans

View File

@ -204,7 +204,7 @@
<a href="/upgrade/"> <a href="/upgrade/">
<button type="submit" class="button green">Upgrade to Standard</button> <button type="submit" class="button green">Upgrade to Standard</button>
</a> </a>
<a href="/plans"> <a href="/plans/">
<button type="submit">View all plans</button> <button type="submit">View all plans</button>
</a> </a>
</p> </p>

View File

@ -22,7 +22,7 @@
<p> <p>
Open-source projects, research collaborations, volunteer Open-source projects, research collaborations, volunteer
organizations. <br />Most communities get an 85%+ discount organizations. <br />Most communities get an 85%+ discount
on <a href="/plans">Zulip Cloud Standard</a>! on <a href="/plans/">Zulip Cloud Standard</a>!
</p> </p>
<div class="hero-text"> <div class="hero-text">
Learn how the <a href="/case-studies/recurse-center/">Recurse Learn how the <a href="/case-studies/recurse-center/">Recurse
@ -50,7 +50,7 @@
</div> </div>
<div class="bottom-register-buttons extra_margin_before_footer"> <div class="bottom-register-buttons extra_margin_before_footer">
<h1> <h1>
Most communities get an 85%+ discount on <a href="/plans">Zulip Cloud Standard</a>! Most communities get an 85%+ discount on <a href="/plans/">Zulip Cloud Standard</a>!
</h1> </h1>
<div class="bottom-text-large"> <div class="bottom-text-large">
<p> Join the hundreds of communities we sponsor. Contact <a href="mailto:sales@zulip.com"> <p> Join the hundreds of communities we sponsor. Contact <a href="mailto:sales@zulip.com">

View File

@ -22,7 +22,7 @@
<div class="content"> <div class="content">
<h1 class="center">Zulip for conferences and events</h1> <h1 class="center">Zulip for conferences and events</h1>
<p>Conferences, workshops, hackathons. In-person, online, and anything in between. <p>Conferences, workshops, hackathons. In-person, online, and anything in between.
<br/><a href="/plans">Zulip Cloud Standard</a> is free for <br/><a href="/plans/">Zulip Cloud Standard</a> is free for
academic conferences and most other non-profit events! academic conferences and most other non-profit events!
</p> </p>
</div> </div>
@ -280,7 +280,7 @@
<div class="feature-end"> <div class="feature-end">
<div class="bottom-register-buttons"> <div class="bottom-register-buttons">
<h1> <h1>
<a href="/plans">Zulip Cloud Standard</a> is free for academic conferences and <a href="/plans/">Zulip Cloud Standard</a> is free for academic conferences and
most other non-profit events! most other non-profit events!
</h1> </h1>
<div class="hero-buttons center"> <div class="hero-buttons center">

View File

@ -22,7 +22,7 @@
<h1 class="center">Zulip for open source projects</h1> <h1 class="center">Zulip for open source projects</h1>
<p> <p>
Grow your community with thoughtful and inclusive discussion. Grow your community with thoughtful and inclusive discussion.
<br/><a href="/plans">Zulip Cloud Standard</a> is free for open-source <br/><a href="/plans/">Zulip Cloud Standard</a> is free for open-source
projects! projects!
</p> </p>
</div> </div>
@ -123,7 +123,7 @@
<li> <li>
<div class="list-content"> <div class="list-content">
Maintain access to your organization's entire Maintain access to your organization's entire
message history with free <a href="/plans">Zulip message history with free <a href="/plans/">Zulip
Cloud Standard</a> hosting. Information is at your Cloud Standard</a> hosting. Information is at your
fingertips with Zulip's <a fingertips with Zulip's <a
href="/help/search-for-messages">powerful full-text href="/help/search-for-messages">powerful full-text
@ -710,7 +710,7 @@
<div class="bottom-register-buttons extra_margin_before_footer"> <div class="bottom-register-buttons extra_margin_before_footer">
<h1> <h1>
<a href="/plans">Zulip Cloud Standard</a> is free for open-source projects! <a href="/plans/">Zulip Cloud Standard</a> is free for open-source projects!
</h1> </h1>
<div class="bottom-text-large"> <div class="bottom-text-large">
<p>Join the hundreds of open-source projects we sponsor.</p> <p>Join the hundreds of open-source projects we sponsor.</p>

View File

@ -23,7 +23,7 @@
<h1 class="center">Zulip for research</h1> <h1 class="center">Zulip for research</h1>
<p> <p>
Chat for your project, research group, department or scientific Chat for your project, research group, department or scientific
field. <br/><a href="/plans">Zulip Cloud Standard</a> is free for academic field. <br/><a href="/plans/">Zulip Cloud Standard</a> is free for academic
research! research!
</p> </p>
</div> </div>
@ -128,7 +128,7 @@
<li> <li>
<div class="list-content"> <div class="list-content">
Maintain access to your organization's entire Maintain access to your organization's entire
message history with free <a href="/plans">Zulip message history with free <a href="/plans/">Zulip
Cloud Standard</a> hosting. Information is at your Cloud Standard</a> hosting. Information is at your
fingertips with Zulip's <a fingertips with Zulip's <a
href="/help/search-for-messages">powerful full-text href="/help/search-for-messages">powerful full-text
@ -394,7 +394,7 @@
<div class="feature-end"> <div class="feature-end">
<div class="bottom-register-buttons extra_margin_before_footer"> <div class="bottom-register-buttons extra_margin_before_footer">
<h1> <h1>
<a href="/plans">Zulip Cloud Standard</a> is free for <a href="/plans/">Zulip Cloud Standard</a> is free for
academic research! academic research!
</h1> </h1>
<div class="hero-buttons center"> <div class="hero-buttons center">

View File

@ -129,7 +129,7 @@
<div class="item"> <div class="item">
<div class="item-inner"> <div class="item-inner">
<p class="tour-item-header tour-item-header-top-push tour-item-header-centered">Zulip Free is free for an unlimited number of users.</p> <p class="tour-item-header tour-item-header-top-push tour-item-header-centered">Zulip Free is free for an unlimited number of users.</p>
<a href="/plans" class="call-to-action"> <a href="/plans/" class="call-to-action">
{{ _('See plans and pricing') }} {{ _('See plans and pricing') }}
</a> </a>
<div class="other-resources"> <div class="other-resources">
@ -552,7 +552,7 @@
{{ _('Log in now') }} {{ _('Log in now') }}
</a> </a>
{% else %} {% else %}
<a href="/plans" class="styled-button button green"> <a href="/plans/" class="styled-button button green">
{{ _('See plans and pricing') }} {{ _('See plans and pricing') }}
</a> </a>
{% endif %} {% endif %}

View File

@ -62,7 +62,7 @@ contributors, and more than 75 with 100+ commits." %}
</div> </div>
<p> <p>
Kandra Labs provides commercial Zulip hosting and on-premises support Kandra Labs provides commercial Zulip hosting and on-premises support
at <a href="https://zulip.com/plans">https://zulip.com</a>, at <a href="https://zulip.com/plans/">https://zulip.com</a>,
and employs the core developers of the project. It was and employs the core developers of the project. It was
started in June 2016 to help sustain the growth of the Zulip started in June 2016 to help sustain the growth of the Zulip
project. Kandra Labs is funded by project. Kandra Labs is funded by

View File

@ -82,7 +82,7 @@ An important part of Zulips mission is ensuring that worthy organizations, fr
communities](/case-studies/lean/), are able to use Zulip whether or not they communities](/case-studies/lean/), are able to use Zulip whether or not they
have funding. have funding.
We sponsor [Zulip Cloud Standard](/plans) hosting for [open-source We sponsor [Zulip Cloud Standard](/plans/) hosting for [open-source
projects](/for/open-source/), [research groups](/for/research/), projects](/for/open-source/), [research groups](/for/research/),
[education](/for/education/), [non-profits](/for/communities/) and other [education](/for/education/), [non-profits](/for/communities/) and other
[communities](/for/communities/). This program has grown exponentially since its [communities](/for/communities/). This program has grown exponentially since its

View File

@ -66,7 +66,7 @@ class PorticoDocumentationSpider(BaseDocumentationSpider):
start_urls = [ start_urls = [
"http://localhost:9981/hello/", "http://localhost:9981/hello/",
"http://localhost:9981/history/", "http://localhost:9981/history/",
"http://localhost:9981/plans", "http://localhost:9981/plans/",
"http://localhost:9981/team", "http://localhost:9981/team",
"http://localhost:9981/apps", "http://localhost:9981/apps",
"http://localhost:9981/integrations/", "http://localhost:9981/integrations/",

View File

@ -18,11 +18,11 @@
{{else}} {{else}}
<li class="org-info org-plan hidden-for-spectators small-font-size"> <li class="org-info org-plan hidden-for-spectators small-font-size">
{{#if is_plan_limited }} {{#if is_plan_limited }}
<a href="/plans" target="_blank" rel="noopener noreferrer" role="menuitem">Zulip Cloud Free</a> <a href="/plans/" target="_blank" rel="noopener noreferrer" role="menuitem">Zulip Cloud Free</a>
{{else if is_plan_standard}} {{else if is_plan_standard}}
<a href="/plans" target="_blank" rel="noopener noreferrer" role="menuitem">Zulip Cloud Standard</a> <a href="/plans/" target="_blank" rel="noopener noreferrer" role="menuitem">Zulip Cloud Standard</a>
{{else if is_plan_standard_sponsored_for_free}} {{else if is_plan_standard_sponsored_for_free}}
<a href="/plans" target="_blank" rel="noopener noreferrer" role="menuitem">Zulip Cloud Standard (sponsored)</a> <a href="/plans/" target="_blank" rel="noopener noreferrer" role="menuitem">Zulip Cloud Standard (sponsored)</a>
{{/if}} {{/if}}
</li> </li>
{{/if}} {{/if}}
@ -149,7 +149,7 @@
{{/if}} {{/if}}
{{#if show_plans}} {{#if show_plans}}
<li role="presentation" class="hidden-for-spectators"> <li role="presentation" class="hidden-for-spectators">
<a href="/plans" target="_blank" rel="noopener noreferrer" role="menuitem"> <a href="/plans/" target="_blank" rel="noopener noreferrer" role="menuitem">
<i class="fa fa-rocket" aria-hidden="true"></i> {{t 'Plans and pricing' }} <i class="fa fa-rocket" aria-hidden="true"></i> {{t 'Plans and pricing' }}
</a> </a>
</li> </li>

View File

@ -23,7 +23,7 @@ gear_info = {
"organization-settings": ["Organization settings", "/#organization/organization-profile"], "organization-settings": ["Organization settings", "/#organization/organization-profile"],
"integrations": ["Integrations", "/integrations/"], "integrations": ["Integrations", "/integrations/"],
"stats": ["Usage statistics", "/stats"], "stats": ["Usage statistics", "/stats"],
"plans": ["Plans and pricing", "/plans"], "plans": ["Plans and pricing", "/plans/"],
"billing": ["Billing", "/billing"], "billing": ["Billing", "/billing"],
"invite": ["Invite users", "/#invite"], "invite": ["Invite users", "/#invite"],
"about-zulip": ["About Zulip", "/#about-zulip"], "about-zulip": ["About Zulip", "/#about-zulip"],

View File

@ -423,7 +423,7 @@ class PlansPageTest(ZulipTestCase):
realm.save(update_fields=["plan_type"]) realm.save(update_fields=["plan_type"])
result = self.client_get("/plans/", subdomain="zulip") result = self.client_get("/plans/", subdomain="zulip")
self.assertEqual(result.status_code, 302) self.assertEqual(result.status_code, 302)
self.assertEqual(result["Location"], "/accounts/login/?next=/plans") self.assertEqual(result["Location"], "/accounts/login/?next=/plans/")
guest_user = "polonius" guest_user = "polonius"
self.login(guest_user) self.login(guest_user)
@ -463,14 +463,14 @@ class PlansPageTest(ZulipTestCase):
with self.settings(PRODUCTION=True): with self.settings(PRODUCTION=True):
result = self.client_get("/plans/", subdomain="zulip") result = self.client_get("/plans/", subdomain="zulip")
self.assertEqual(result.status_code, 302) self.assertEqual(result.status_code, 302)
self.assertEqual(result["Location"], "https://zulip.com/plans") self.assertEqual(result["Location"], "https://zulip.com/plans/")
self.login("iago") self.login("iago")
# SELF_HOSTED should hide the local plans page, even if logged in # SELF_HOSTED should hide the local plans page, even if logged in
result = self.client_get("/plans/", subdomain="zulip") result = self.client_get("/plans/", subdomain="zulip")
self.assertEqual(result.status_code, 302) self.assertEqual(result.status_code, 302)
self.assertEqual(result["Location"], "https://zulip.com/plans") self.assertEqual(result["Location"], "https://zulip.com/plans/")
# But in the development environment, it renders a page # But in the development environment, it renders a page
result = self.client_get("/plans/", subdomain="zulip") result = self.client_get("/plans/", subdomain="zulip")