Hi,
I have to read a file from server side . Obtained its contents stored it in a list and sent it to template Now, My question is how to access this list so as to display the contents of files line by line . I am using ajax and jquery to obtain the data on client side
def showfiledata(request):
f = open("/home/tazim/webexample/test.txt")
list = f.readlines()
return_dict = {'list':list}
json = simplejson.dumps(list)
return HttpResponse(json,mimetype="application/json")