[pyar] [django] request y json
Daniel
dmlistapython en gmail.com
Mar Sep 10 11:24:03 ART 2013
> >
> > Eso no es JSON ni de cerca. Fijate el código del que esta mandando el
> > pedido y decile que por favor, en serio mande JSON
> >
> >
> > es este:
> > $.ajax({
> > url: "/administracion/guardarmodificaciones/",
> > type: "POST",
> > dataType: "json",
> > data: datos,
> > })
> >
> > y datos es el string que pasé como ejemplo
>
> de la doc de jquery:
>
> dataType (default: Intelligent Guess (xml, json, script, or html))
> Type: String
> The type of data that you're expecting back from the server.
>
> ...
>
> The data option can contain either a query string of the form
> key1=value1&key2=value2, or an object of the form {key1: 'value1',
> key2:
> 'value2'}. If the latter form is used, the data is converted into a
> query
> string using jQuery.param() before it is sent. This processing can be
> circumvented by setting processData to false. The processing might be
> undesirable if you wish to send an XML object to the server; in this
> case,
> change the contentType option from application/x-www-form-urlencoded
> to a more
> appropriate MIME type.
>
> de memoria:
>
> $.ajax({url: url, type: "POST", contentType: "application/json", data:
> JSON.stringify(datos), dataType: "json"})
> _______________________________________________
>
Exacto mariano, buena memoria...GRACIAS!!!!
Gracias por la ayuda
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20130910/d4abf9da/attachment.html>
More information about the pyar
mailing list