2016-04-27 06:33:37 +02:00
|
|
|
from django.conf.urls import patterns, url, include
|
|
|
|
|
2016-05-19 17:33:30 +02:00
|
|
|
i18n_urlpatterns = [
|
2016-04-27 06:33:37 +02:00
|
|
|
# SSO dispatch page for desktop app with SSO
|
|
|
|
# Allows the user to enter their email address only,
|
|
|
|
# and then redirects the user to the proper deployment
|
|
|
|
# SSO-login page
|
2016-05-19 17:33:30 +02:00
|
|
|
url(r'^accounts/deployment_dispatch$',
|
|
|
|
'zilencer.views.account_deployment_dispatch',
|
2016-04-27 06:33:37 +02:00
|
|
|
{'template_name': 'zerver/login.html'}),
|
2016-05-19 17:33:30 +02:00
|
|
|
]
|
2016-04-27 06:33:37 +02:00
|
|
|
|
|
|
|
# Zilencer views following the REST API style
|
2016-06-24 02:26:09 +02:00
|
|
|
v1_api_and_json_patterns = [
|
2016-08-11 21:37:31 +02:00
|
|
|
url('^deployment/feedback$', 'zerver.lib.rest.rest_dispatch',
|
2016-06-24 02:26:09 +02:00
|
|
|
{'POST': 'zilencer.views.submit_feedback'}),
|
2016-08-11 21:37:31 +02:00
|
|
|
url('^deployment/report_error$', 'zerver.lib.rest.rest_dispatch',
|
2016-06-24 02:26:09 +02:00
|
|
|
{'POST': 'zilencer.views.report_error'}),
|
2016-08-11 21:37:31 +02:00
|
|
|
url('^deployment/endpoints$', 'zilencer.views.lookup_endpoints_for_user'),
|
2016-06-24 02:26:09 +02:00
|
|
|
]
|
2016-04-27 06:33:37 +02:00
|
|
|
|
2016-06-24 02:26:09 +02:00
|
|
|
urlpatterns = [
|
2016-04-27 06:33:37 +02:00
|
|
|
url(r'^api/v1/', include(v1_api_and_json_patterns)),
|
|
|
|
url(r'^json/', include(v1_api_and_json_patterns)),
|
2016-06-24 02:26:09 +02:00
|
|
|
] + i18n_urlpatterns
|