Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

248
Vistas
send information from a js variable to python

I need to send an object that contains a variable in js, the idea is to be able to send that information to python (I use django) and capture that info to be able to perform the validations that I need from the backend (python) and not from js, how can I do it ?

code ajax:

function CapturarDatosOrden() {

$.ajax({
    url: window.location.pathname,
    type: 'POST',
    data: {
        'action': 'prueba',
    },
    beforeSend: function (jqXHR) {
        $.xhrPool.push(jqXHR);

        $(".loader").fadeIn('fast');

    },
    dataType: 'json',

    complete: function (jqXHR) {
        // boton.disabled = false;           
        $('.loader').fadeOut('fast');
        var index = $.xhrPool.indexOf(jqXHR);
        if (index > -1) {
            $.xhrPool.splice(index, 1);
        }
    },
}).done(function (data) {
    // alert('entro al primer ajax para comparar el tipo de orden y su tecnologia')

    var info = data.find(data => data.id__ordenes == idOrden);

the "info" variable has the object I need to capture in python, the object is something like this:

{ id__ordenes: "219661981", fk_ot__tipo_orden: "4", fk_bss__contratos: "3257733", otciudad: "1", otdireccion: "----", fk_ot__cc: "1", open_orden: "42588165", instalador: "4320", fk_contratistas__equipos_vendedores: "1", fk_ot__causales: "88" }

how can i do it?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda