views:

84

answers:

1

Hi does anyone integrated cappuccino with django. I wanted to use cappuccino as a front-end and django as a backend and communicate via CFHTTPRequest / Json.

I did the following: copy the the cappuccino app to the templates folder of my django app. Then used a render_to_response to the index.html generated by cappuccino.

Unfortunately nothing happens

Thnks for your help

A: 

Not sure what you're trying to do but I do use Cappuccino with Django for the backend. I used the Piston framework to expose a standard RESTful API which the Cappuccino client then calls into using the regular CPURLRequest and CPURLConnection classes.

The Cappuccino app is served as regular static files with the index.html Cappuccino gives you as a Django template.

Alexander Ljungberg
how did you call the cappuccino index.html from django. i tried this from the views.py def testcapu(request): return render_to_response('index.html', {}) and i only see Loading NewApplication... Thats it.
locojay
I also tried:def testcapu(request): return HttpResponse(open('/Users/xxxxxx/Downloads/Starter/NewApplication/index.html').read())same only shows loading
locojay
got it just copied the cappucino project to static folder. Then copied the content of the index.html to the templates/mapp.html and changed the paths using {{MEDIA_URL}} the used return render_to_response('testcappu.html', {}, context_instance = RequestContext(request))
locojay