events: Rewrite system for managing realm exports.

This feature is intended to cover all of our ways of exporting a
realm, not just the initial "public export" feature, so we should name
things appropriately for that goal.

Additionally, we don't want to include data exports in page_params;
the original implementation was actually buggy and would have.
This commit is contained in:
Wyatt Hoodes
2019-06-23 14:51:13 -10:00
committed by Tim Abbott
parent b1900c406a
commit bbbea9ec87
8 changed files with 41 additions and 31 deletions

View File

@@ -36,7 +36,7 @@ import zerver.views.realm
import zerver.views.digest
import zerver.views.messages
from zerver.context_processors import latest_info_context
import zerver.views.public_export
import zerver.views.realm_export
from zerver.lib.rest import rest_dispatch
@@ -398,10 +398,10 @@ v1_api_and_json_patterns = [
url(r'^calls/create$', rest_dispatch,
{'GET': 'zerver.views.video_calls.get_zoom_url'}),
# Used for public-only realm exporting
# Used realm data exporting
url(r'^export/realm$', rest_dispatch,
{'POST': 'zerver.views.public_export.public_only_realm_export',
'GET': 'zerver.views.public_export.get_public_exports'}),
{'POST': 'zerver.views.realm_export.export_realm',
'GET': 'zerver.views.realm_export.get_realm_exports'}),
]
# These views serve pages (HTML). As such, their internationalization