@home.route('/export_package', methods=['GET', 'POST'])
@login_required
def export_package():
    if ((request.method == 'POST') and (BTN_CANCEL in request.form)):
        return redirect(get_back_url())
    (current_document, eml_node) = reload_metadata()
    if (request.method == 'POST'):
        save_both_formats(current_document, eml_node)
        zipfile_path = zip_package(current_document, eml_node)
        if zipfile_path:
            (archive_basename, download_url) = save_as_ezeml_package_export(zipfile_path)
            if download_url:
                return redirect(url_for('home.export_package_2', package_name=archive_basename, download_url=get_shortened_url(download_url), safe=''))
        (archive_basename, download_url) = save_as_ezeml_package_export(zipfile_path)
        if download_url:
            return redirect(url_for('home.export_package_2', package_name=archive_basename, download_url=get_shortened_url(download_url), safe=''))
    help = get_helps(['export_package'])
    return render_template('export_package.html', back_url=get_back_url(), title='Export Data Package', help=help)
@home.route('/export_package', methods=['GET', 'POST'])
@login_required
def export_package():
    if ((request.method == 'POST') and (BTN_CANCEL in request.form)):
        return redirect(get_back_url())
    (current_document, eml_node) = reload_metadata()
    if (request.method == 'POST'):
        save_both_formats(current_document, eml_node)
        zipfile_path = zip_package(current_document, eml_node)
        if zipfile_path:
            (archive_basename, download_url) = save_as_ezeml_package_export(zipfile_path)
            if download_url:
                return redirect(url_for('home.export_package_2', package_name=archive_basename, download_url=get_shortened_url(download_url), safe=))
        (archive_basename, download_url) = save_as_ezeml_package_export(zipfile_path)
        if download_url:
            return redirect(url_for('home.export_package_2', package_name=archive_basename, download_url=get_shortened_url(download_url), safe=))
    help = get_helps(['export_package'])
    return render_template('export_package.html', back_url=get_back_url(), title='Export Data Package', help=help)