(request)
return json_response({
        'message': 'New CommCare build added',
        'info': {
            'version': version,
            '_id': build.get_id,
        }
    })
example POST params:
    version: '2.13.0'
example POST params:
    version: '2.13.0'
example POST params : version : 2 . 13 . 0
def import_build(request):
    """
    example POST params:
    version: '2.13.0'

    """
    version = request.POST.get('version')

    try:
        SemanticVersionProperty(required=True).validate(version)
    except BadValueError as e:
        return json_response({
            'reason': 'Badly formatted version',
            'info': {
                'error_message': str(e),
                'error_type': str(type(e))
            }
        }, status_code=400)

    build = CommCareBuild.create_without_artifacts(version, None)

    return json_response({
        'message': 'New CommCare build added',
        'info': {
            'version': version,
            '_id': build.get_id,
        }
    })
def import_build ( request ) : version = request . POST . get ( 'version' ) try : SemanticVersionProperty ( required = True ) . validate ( version ) except BadValueError as e : return json_response ( { 'reason' : 'Badly formatted version' , 'info' : { 'error_message' : str ( e ) , 'error_type' : str ( type ( e ) ) } } , status_code = 400 ) build = CommCareBuild . create_without_artifacts ( version , None ) return json_response ( { 'message' : 'New CommCare build added' , 'info' : { 'version' : version , '_id' : build . get_id , } } )