@home.route('/import_package_2/<package_name>', methods=['GET', 'POST'])
@login_required
def import_package_2(package_name):
    form = ImportPackageForm()
    if ((request.method == 'POST') and (BTN_CANCEL in request.form)):
        return redirect(get_back_url())
    reload_metadata()
    if ((request.method == 'POST') and form.validate_on_submit()):
        form = request.form
        if (form['replace_copy'] == 'copy'):
            package_name = copy_ezeml_package(package_name)
        import_ezeml_package(package_name)
        fixup_upload_management()
        current_user.set_filename(filename=package_name)
        return redirect(url_for(PAGE_TITLE, filename=package_name))
    help = get_helps(['import_package_2'])
    return render_template('import_package_2.html', title='Import an ezEML Data Package', package_name=package_name, form=form, help=help)
@home.route('/import_package_2/<package_name>', methods=['GET', 'POST'])
@login_required
def import_package_2(package_name):
    form = ImportPackageForm()
    if ((request.method == 'POST') and (BTN_CANCEL in request.form)):
        return redirect(get_back_url())
    reload_metadata()
    if ((request.method == 'POST') and form.validate_on_submit()):
        form = request.form
        if (form['replace_copy'] == 'copy'):
            package_name = copy_ezeml_package(package_name)
        import_ezeml_package(package_name)
        fixup_upload_management()
        current_user.set_filename(filename=package_name)
        return redirect(url_for(PAGE_TITLE, filename=package_name))
    help = get_helps(['import_package_2'])
    return render_template('import_package_2.html', title='Import an ezEML Data Package', package_name=package_name, form=form, help=help)