2018-09-25 12:24:11 +02:00
|
|
|
from typing import Any
|
|
|
|
|
2017-11-02 12:50:48 +01:00
|
|
|
from django.views.generic import TemplateView
|
2018-09-25 12:24:11 +02:00
|
|
|
from django.conf.urls import include, url
|
|
|
|
|
|
|
|
import corporate.views
|
|
|
|
from zerver.lib.rest import rest_dispatch
|
2013-11-05 23:50:19 +01:00
|
|
|
|
2016-05-19 17:33:30 +02:00
|
|
|
i18n_urlpatterns = [
|
2013-11-06 12:50:13 +01:00
|
|
|
# Zephyr/MIT
|
|
|
|
url(r'^zephyr/$', TemplateView.as_view(template_name='corporate/zephyr.html')),
|
|
|
|
url(r'^zephyr-mirror/$', TemplateView.as_view(template_name='corporate/zephyr-mirror.html')),
|
2018-09-25 12:24:11 +02:00
|
|
|
|
|
|
|
# Billing
|
|
|
|
url(r'^billing/$', corporate.views.billing_home, name='corporate.views.billing_home'),
|
|
|
|
url(r'^upgrade/$', corporate.views.initial_upgrade, name='corporate.views.initial_upgrade'),
|
|
|
|
] # type: Any
|
|
|
|
|
|
|
|
v1_api_and_json_patterns = [
|
2018-12-07 18:43:22 +01:00
|
|
|
url(r'^billing/upgrade$', rest_dispatch,
|
|
|
|
{'POST': 'corporate.views.upgrade'}),
|
2019-04-08 05:16:35 +02:00
|
|
|
url(r'^billing/plan/change$', rest_dispatch,
|
|
|
|
{'POST': 'corporate.views.change_plan_at_end_of_cycle'}),
|
2018-11-01 11:26:29 +01:00
|
|
|
url(r'^billing/sources/change', rest_dispatch,
|
2018-09-25 12:24:11 +02:00
|
|
|
{'POST': 'corporate.views.replace_payment_source'}),
|
2016-05-19 17:33:30 +02:00
|
|
|
]
|
2016-03-21 03:13:38 +01:00
|
|
|
|
2018-09-25 12:24:11 +02:00
|
|
|
# Make a copy of i18n_urlpatterns so that they appear without prefix for English
|
|
|
|
urlpatterns = list(i18n_urlpatterns)
|
|
|
|
|
|
|
|
urlpatterns += [
|
|
|
|
url(r'^api/v1/', include(v1_api_and_json_patterns)),
|
|
|
|
url(r'^json/', include(v1_api_and_json_patterns)),
|
|
|
|
]
|