#NEWLINE# def profile_points_graph_json( request , user_id ) : #NEWLINE# #INDENT# user = get_object_or_404 ( User . objects . select_related ( ) , pk = user_id ) #NEWLINE# if request . profile . points_history : #NEWLINE# #INDENT# history = ( user . profile . points_history + [ ( ( user . profile . points_history [ ( - 1 ) ] [ 0 ] + timedelta ( 1 ) ) , user . profile . points ) ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# history = None #NEWLINE# #UNINDENT# response_data = simplejson . dumps ( { #NEWLINE# #INDENT# 'user' : user . id , #NEWLINE# 'history' : history , #NEWLINE# #UNINDENT# } , cls = DjangoJSONEncoder ) #NEWLINE# return HttpResponse ( response_data , content_type = 'application/json' )