Obviously, horses for courses, but what are some good ways to integrate javascript libraries with one\'s Django application?
I\'m planning on using jQuery, mostly becaus
I've always just made my own views which serve up JSON, and written the JavaScript myself (normally using jQuery). Obviously, this all depends on what you're trying to do - if there's a specific need you've got which an existing app solves, then by all means use it.
Serving up JSON is pretty trivial (just dump out some JSON and return it as an HttpResponse), like this:
def get_user_ids(request):
if not request.is_ajax():
raise Http404
return HttpResponse(simplejson.dumps({'ids': [u.pk for User.objects.all()]}))
Code above intended to be demonstrative, I'm not suggesting you make a view which shows all your user IDs.