result = [SQLRow(cursor, r) for r in cursor.fetchall()]
return render_to_response('cdr_user.html', {'result': result},
    context_instance=RequestContext(request))
How to make an external database query iterable?