Beispiel #1
0
def notify_realm_export(user_profile: UserProfile) -> None:
    # In the future, we may want to send this event to all realm admins.
    event = dict(type="realm_export",
                 exports=get_realm_exports_serialized(user_profile))
    send_event(user_profile.realm, event, [user_profile.id])
def get_realm_exports(request: HttpRequest, user: UserProfile) -> HttpResponse:
    realm_exports = get_realm_exports_serialized(user)
    return json_success({"exports": realm_exports})