I have a Django template where it shows multiple values received from the database and passes it to the template, something like following:
in views.py
def test1(requests):
requests.get...
requests.get...
requests.get...
someQuery = "select id from table;"
executeQ(someQuery)
someQuery = "select id from table;"
executeQ(someQuery)
someQuery = "select id from table;"
executeQ(someQuery)
context = Data1, Data2, Data3
return render_to_response('test1/index.html', context)
in template/test1/index.html
<html>
......
<table>
<th> header1 </th>
<th> header2 </th>
<th> header3 </th>
{% for row in context %}
<td> row.1 </td>
<td> row.2 </td>
<td> row.3 </td>
{% endfor %}
Now, what I want is to update those row.1, row.2, row.3 via Ajax without realoding the page everytime. The data come from the database. So where and how can I put in some Ajax() so this happens with Django?