mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
Fixes #2665. Regenerated by tabbott with `lint --fix` after a rebase and change in parameters. Note from tabbott: In a few cases, this converts technical debt in the form of unsorted imports into different technical debt in the form of our largest files having very long, ugly import sequences at the start. I expect this change will increase pressure for us to split those files, which isn't a bad thing. Signed-off-by: Anders Kaseorg <anders@zulip.com>
38 lines
1.3 KiB
Python
38 lines
1.3 KiB
Python
from typing import Any
|
|
|
|
from django.conf.urls import include
|
|
from django.urls import path
|
|
from django.views.generic import TemplateView
|
|
|
|
import corporate.views
|
|
from zerver.lib.rest import rest_dispatch
|
|
|
|
i18n_urlpatterns: Any = [
|
|
# Zephyr/MIT
|
|
path('zephyr/', TemplateView.as_view(template_name='corporate/zephyr.html')),
|
|
path('zephyr-mirror/', TemplateView.as_view(template_name='corporate/zephyr-mirror.html')),
|
|
|
|
path('jobs/', TemplateView.as_view(template_name='corporate/jobs.html')),
|
|
|
|
# Billing
|
|
path('billing/', corporate.views.billing_home, name='corporate.views.billing_home'),
|
|
path('upgrade/', corporate.views.initial_upgrade, name='corporate.views.initial_upgrade'),
|
|
]
|
|
|
|
v1_api_and_json_patterns = [
|
|
path('billing/upgrade', rest_dispatch,
|
|
{'POST': 'corporate.views.upgrade'}),
|
|
path('billing/plan/change', rest_dispatch,
|
|
{'POST': 'corporate.views.change_plan_status'}),
|
|
path('billing/sources/change', rest_dispatch,
|
|
{'POST': 'corporate.views.replace_payment_source'}),
|
|
]
|
|
|
|
# Make a copy of i18n_urlpatterns so that they appear without prefix for English
|
|
urlpatterns = list(i18n_urlpatterns)
|
|
|
|
urlpatterns += [
|
|
path('api/v1/', include(v1_api_and_json_patterns)),
|
|
path('json/', include(v1_api_and_json_patterns)),
|
|
]
|