mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
The fixture changes are because self.upgrade formerly used to cause a page load of /billing, which in turn calls Customer.retrieve. If we ran the full test suite with GENERATE_STRIPE_FIXTURES=True, we would likely see several more Customer.retrieve.N.json's being deleted. But keeping them there for now to keep the diff small.
35 lines
1.2 KiB
Python
35 lines
1.2 KiB
Python
from typing import Any
|
|
|
|
from django.views.generic import TemplateView
|
|
from django.conf.urls import include, url
|
|
|
|
import corporate.views
|
|
from zerver.lib.rest import rest_dispatch
|
|
|
|
i18n_urlpatterns = [
|
|
# 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')),
|
|
|
|
# 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 = [
|
|
url(r'^billing/upgrade$', rest_dispatch,
|
|
{'POST': 'corporate.views.upgrade'}),
|
|
url(r'^billing/downgrade$', rest_dispatch,
|
|
{'POST': 'corporate.views.downgrade'}),
|
|
url(r'^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 += [
|
|
url(r'^api/v1/', include(v1_api_and_json_patterns)),
|
|
url(r'^json/', include(v1_api_and_json_patterns)),
|
|
]
|