(request, domain)
return render(request, "case_importer/excel_config.html", context)
Step one of three.

    This is the initial post when the user uploads the Excel file
Step one of three.
Step one of three .
def excel_config(request, domain):
    """
    Step one of three.

    This is the initial post when the user uploads the Excel file

    """
    if request.method != 'POST':
        return HttpResponseRedirect(base.ImportCases.get_url(domain=domain))

    if not request.FILES:
        return render_error(request, domain, 'Please choose an Excel file to import.')

    uploaded_file_handle = request.FILES['file']
    try:
        case_upload, context = _process_file_and_get_upload(
            uploaded_file_handle, request, domain, max_columns=MAX_CASE_IMPORTER_COLUMNS
        )
    except ImporterError as e:
        return render_error(request, domain, get_importer_error_message(e))
    except SpreadsheetFileExtError:
        return render_error(request, domain, _("Please upload file with extension .xls or .xlsx"))

    context.update(_case_importer_breadcrumb_context(_('Case Options'), domain))
    return render(request, "case_importer/excel_config.html", context)
def excel_config ( request , domain ) : if request . method != 'POST' : return HttpResponseRedirect ( base . ImportCases . get_url ( domain = domain ) ) if not request . FILES : return render_error ( request , domain , 'Please choose an Excel file to import.' ) uploaded_file_handle = request . FILES [ 'file' ] try : case_upload , context = _process_file_and_get_upload ( uploaded_file_handle , request , domain , max_columns = MAX_CASE_IMPORTER_COLUMNS ) except ImporterError as e : return render_error ( request , domain , get_importer_error_message ( e ) ) except SpreadsheetFileExtError : return render_error ( request , domain , _ ( "Please upload file with extension .xls or .xlsx" ) ) context . update ( _case_importer_breadcrumb_context ( _ ( 'Case Options' ) , domain ) ) return render ( request , "case_importer/excel_config.html" , context )