(case_blocks, domain, username="system", user_id=None,
                       xmlns=None, attachments=None, form_id=None,
                       form_extras=None, case_db=None, device_id=None, max_wait=...)
return result.xform, result.cases
Submits casexml in a manner similar to how they would be submitted from a phone.

    :param xmlns: Form XMLNS. Format: IRI or URN. Historically this was
    used in some places to uniquely identify the subsystem that posted
    the cases; `device_id` is now recommended for that purpose. Going
    forward, it is recommended to use the default value along with
    `device_id`, which indicates that the cases were submitted by an
    internal system process.
    :param device_id: Identifier for the source of posted cases. Ideally
    this should uniquely identify the subsystem that is posting cases to
    make it easier to trace the source. All new code should use this
    argument. A human recognizable value is recommended outside of test
    code. Example: "auto-close-rule-<GUID>"
    :param max_wait: Maximum time (in seconds) to allow the process to be delayed if
    the project is over its submission rate limit.
    See the docstring for submit_form_locally for meaning of values.

    returns the UID of the resulting form.
Submits casexml in a manner similar to how they would be submitted from a phone.
Submits casexml in a manner similar to how they would be submitted from a phone .
def submit_case_blocks(case_blocks, domain, username="system", user_id=None,
                       xmlns=None, attachments=None, form_id=None,
                       form_extras=None, case_db=None, device_id=None, max_wait=...):
    """
    Submits casexml in a manner similar to how they would be submitted from a phone.

    :param xmlns: Form XMLNS. Format: IRI or URN. Historically this was
    used in some places to uniquely identify the subsystem that posted
    the cases; `device_id` is now recommended for that purpose. Going
    forward, it is recommended to use the default value along with
    `device_id`, which indicates that the cases were submitted by an
    internal system process.
    :param device_id: Identifier for the source of posted cases. Ideally
    this should uniquely identify the subsystem that is posting cases to
    make it easier to trace the source. All new code should use this
    argument. A human recognizable value is recommended outside of test
    code. Example: "auto-close-rule-<GUID>"
    :param max_wait: Maximum time (in seconds) to allow the process to be delayed if
    the project is over its submission rate limit.
    See the docstring for submit_form_locally for meaning of values.

    returns the UID of the resulting form.
    """
    attachments = attachments or {}
    now = json_format_datetime(datetime.datetime.utcnow())
    if not isinstance(case_blocks, str):
        case_blocks = ''.join(case_blocks)
    form_id = form_id or uuid.uuid4().hex
    form_xml = render_to_string('hqcase/xml/case_block.xml', {
        'xmlns': xmlns or SYSTEM_FORM_XMLNS,
        'case_block': case_blocks,
        'time': now,
        'uid': form_id,
        'username': username,
        'user_id': user_id or "",
        'device_id': device_id or "",
    })
    form_extras = form_extras or {}

    result = submit_form_locally(
        instance=form_xml,
        domain=domain,
        attachments=attachments,
        case_db=case_db,
        max_wait=max_wait,
        **form_extras
    )
    return result.xform, result.cases
def submit_case_blocks ( case_blocks , domain , username = "system" , user_id = None , xmlns = None , attachments = None , form_id = None , form_extras = None , case_db = None , device_id = None , max_wait = ... ) : attachments = attachments or { } now = json_format_datetime ( datetime . datetime . utcnow ( ) ) if not isinstance ( case_blocks , str ) : case_blocks = '' . join ( case_blocks ) form_id = form_id or uuid . uuid4 ( ) . hex form_xml = render_to_string ( 'hqcase/xml/case_block.xml' , { 'xmlns' : xmlns or SYSTEM_FORM_XMLNS , 'case_block' : case_blocks , 'time' : now , 'uid' : form_id , 'username' : username , 'user_id' : user_id or "" , 'device_id' : device_id or "" , } ) form_extras = form_extras or { } result = submit_form_locally ( instance = form_xml , domain = domain , attachments = attachments , case_db = case_db , max_wait = max_wait , * * form_extras ) return result . xform , result . cases