mirror of https://github.com/zulip/zulip.git
tornado: Move zerver.tornadoviews to zerver.tornado.views.
This furthers the overall goal of moving all the Tornado-specific code to zerver/tornado/.
This commit is contained in:
parent
169d404579
commit
1fcf2ff525
|
@ -23,7 +23,7 @@ paths will be familiar to Django developers.
|
||||||
|
|
||||||
* `zerver/views/webhooks/` Webhook views for [Zulip integrations](integration-guide.html).
|
* `zerver/views/webhooks/` Webhook views for [Zulip integrations](integration-guide.html).
|
||||||
|
|
||||||
* `zerver/tornadoviews.py` Tornado views.
|
* `zerver/tornado/views.py` Tornado views.
|
||||||
|
|
||||||
* `zerver/worker/queue_processors.py` [Queue workers](queuing.html).
|
* `zerver/worker/queue_processors.py` [Queue workers](queuing.html).
|
||||||
|
|
||||||
|
|
|
@ -290,7 +290,7 @@ def build_custom_checkers(by_lang):
|
||||||
# are already captured
|
# are already captured
|
||||||
('zerver/middleware.py',
|
('zerver/middleware.py',
|
||||||
'return json_error(exception.to_json_error_msg(), status=status_code)'),
|
'return json_error(exception.to_json_error_msg(), status=status_code)'),
|
||||||
('zerver/tornadoviews.py', 'return json_error(result["message"])'),
|
('zerver/tornado/views.py', 'return json_error(result["message"])'),
|
||||||
('zerver/views/invite.py',
|
('zerver/views/invite.py',
|
||||||
'return json_error(data=error_data, msg=ret_error)'),
|
'return json_error(data=error_data, msg=ret_error)'),
|
||||||
('zerver/views/streams.py', 'return json_error(property_conversion)'),
|
('zerver/views/streams.py', 'return json_error(property_conversion)'),
|
||||||
|
|
|
@ -64,7 +64,7 @@ from zerver.lib.validator import (
|
||||||
|
|
||||||
from zerver.views.events_register import _default_all_public_streams, _default_narrow
|
from zerver.views.events_register import _default_all_public_streams, _default_narrow
|
||||||
|
|
||||||
from zerver.tornadoviews import get_events_backend
|
from zerver.tornado.views import get_events_backend
|
||||||
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
import mock
|
import mock
|
||||||
|
|
|
@ -29,7 +29,7 @@ from tornado.web import Application
|
||||||
from tornado.websocket import websocket_connect
|
from tornado.websocket import websocket_connect
|
||||||
|
|
||||||
from zerver.tornado.application import create_tornado_application
|
from zerver.tornado.application import create_tornado_application
|
||||||
from zerver.tornadoviews import get_events_backend
|
from zerver.tornado.views import get_events_backend
|
||||||
|
|
||||||
from six.moves.http_cookies import SimpleCookie
|
from six.moves.http_cookies import SimpleCookie
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ from zerver.lib.integrations import WEBHOOK_INTEGRATIONS
|
||||||
from django.contrib.auth.views import (login, password_reset,
|
from django.contrib.auth.views import (login, password_reset,
|
||||||
password_reset_done, password_reset_confirm, password_reset_complete)
|
password_reset_done, password_reset_confirm, password_reset_complete)
|
||||||
|
|
||||||
|
import zerver.tornado.views
|
||||||
import zerver.views
|
import zerver.views
|
||||||
import zerver.views.auth
|
import zerver.views.auth
|
||||||
import zerver.views.zephyr
|
import zerver.views.zephyr
|
||||||
|
@ -22,7 +23,6 @@ import zerver.views.integrations
|
||||||
import confirmation.views
|
import confirmation.views
|
||||||
|
|
||||||
from zerver.lib.rest import rest_dispatch
|
from zerver.lib.rest import rest_dispatch
|
||||||
from zerver import tornadoviews
|
|
||||||
|
|
||||||
# NB: There are several other pieces of code which route requests by URL:
|
# NB: There are several other pieces of code which route requests by URL:
|
||||||
#
|
#
|
||||||
|
@ -273,10 +273,10 @@ v1_api_and_json_patterns = [
|
||||||
url(r'^register$', rest_dispatch,
|
url(r'^register$', rest_dispatch,
|
||||||
{'POST': 'zerver.views.events_register.api_events_register'}),
|
{'POST': 'zerver.views.events_register.api_events_register'}),
|
||||||
|
|
||||||
# events -> zerver.tornadoviews
|
# events -> zerver.tornado.views
|
||||||
url(r'^events$', rest_dispatch,
|
url(r'^events$', rest_dispatch,
|
||||||
{'GET': 'zerver.tornadoviews.get_events_backend',
|
{'GET': 'zerver.tornado.views.get_events_backend',
|
||||||
'DELETE': 'zerver.tornadoviews.cleanup_event_queue'}),
|
'DELETE': 'zerver.tornado.views.cleanup_event_queue'}),
|
||||||
]
|
]
|
||||||
|
|
||||||
# Include the dual-use patterns twice
|
# Include the dual-use patterns twice
|
||||||
|
@ -334,7 +334,7 @@ for app_name in settings.EXTRA_INSTALLED_APPS:
|
||||||
# Tornado views
|
# Tornado views
|
||||||
urls += [
|
urls += [
|
||||||
# Used internally for communication between Django and Tornado processes
|
# Used internally for communication between Django and Tornado processes
|
||||||
url(r'^notify_tornado$', tornadoviews.notify, name='zerver.tornadoviews.notify'),
|
url(r'^notify_tornado$', zerver.tornado.views.notify, name='zerver.tornado.views.notify'),
|
||||||
]
|
]
|
||||||
|
|
||||||
# Python Social Auth
|
# Python Social Auth
|
||||||
|
|
Loading…
Reference in New Issue