[pyar] Django leer archivos

Juan Manuel Santos vicariousdm en gmail.com
Jue Abr 30 16:01:55 ART 2015


On Thursday, April 30, 2015 14:19:45 Ariel Gerardo Ríos wrote:
> Podés implementar en tu misma instancia de Django:
> 
> 
>    - django-rest-framework: http://www.django-rest-framework.org/
>    - tastypie: http://django-tastypie.readthedocs.org/en/latest/
> 
> 
> Saludos.
> 
Sí, o si es algo bien simple ni siquiera hace falta. Desde js llamás a una URL 
y en la view devolvés un HttpResponse. Un ejemplo horrible y rápido 
devolviendo un json

def do_algo(request, id):
    if request.is_ajax():
        results = get_me_the_json(id)
    return HttpResponse(json.dumps(results), content_type="application/json")
-- 
Juan Manuel Santos <vicariousdm en gmail.com>
Pubkey: www.vicarious.com.ar/~godlike/godlike64.at.gmail.dot.com.asc
------------ próxima parte ------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20150430/2b506bd3/attachment.sig>


More information about the pyar mailing list