mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
Simplify zilencer urls.py configuration to a single file.
The previous separated-out configuration wasn't helping us, and this makes it easier to make the extra installed applications pluggable in the following commits.
This commit is contained in:
24
zilencer/urls.py
Normal file
24
zilencer/urls.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from django.conf.urls import patterns, url, include
|
||||
|
||||
urlpatterns = patterns('zilencer.views',
|
||||
# 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
|
||||
url(r'^accounts/deployment_dispatch$', 'account_deployment_dispatch',
|
||||
{'template_name': 'zerver/login.html'}),
|
||||
)
|
||||
|
||||
# Zilencer views following the REST API style
|
||||
v1_api_and_json_patterns = patterns('zilencer.views',
|
||||
url('^feedback$', 'rest_dispatch',
|
||||
{'POST': 'submit_feedback'}),
|
||||
url('^report_error$', 'rest_dispatch',
|
||||
{'POST': 'report_error'}),
|
||||
url('^endpoints$', 'lookup_endpoints_for_user'),
|
||||
)
|
||||
|
||||
urlpatterns += patterns('',
|
||||
url(r'^api/v1/', include(v1_api_and_json_patterns)),
|
||||
url(r'^json/', include(v1_api_and_json_patterns)),
|
||||
)
|
||||
@@ -1,9 +0,0 @@
|
||||
from django.conf.urls import patterns, url, include
|
||||
|
||||
urlpatterns = patterns('zilencer.views',
|
||||
url('^feedback$', 'rest_dispatch',
|
||||
{'POST': 'submit_feedback'}),
|
||||
url('^report_error$', 'rest_dispatch',
|
||||
{'POST': 'report_error'}),
|
||||
url('^endpoints$', 'lookup_endpoints_for_user'),
|
||||
)
|
||||
@@ -1,9 +0,0 @@
|
||||
from django.conf.urls import patterns, url, include
|
||||
|
||||
urlpatterns = patterns('zilencer.views',
|
||||
# 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
|
||||
url(r'^accounts/deployment_dispatch$', 'account_deployment_dispatch', {'template_name': 'zerver/login.html'}),
|
||||
)
|
||||
@@ -262,13 +262,8 @@ v1_api_and_json_patterns = patterns('zerver.views',
|
||||
'DELETE': 'cleanup_event_queue'}),
|
||||
)
|
||||
if not settings.VOYAGER:
|
||||
v1_api_and_json_patterns += patterns('',
|
||||
# Still scoped to api/v1/, but under a different project
|
||||
url(r'^deployments/', include('zilencer.urls.api')),
|
||||
)
|
||||
|
||||
urlpatterns += patterns('',
|
||||
url(r'^', include('zilencer.urls.pages')),
|
||||
url(r'^', include('zilencer.urls')),
|
||||
)
|
||||
|
||||
urlpatterns += patterns('',
|
||||
|
||||
Reference in New Issue
Block a user