基於AJAX的Django的無端分頁有2個模板: 1.主issue_detail.html 2.分頁模板issue_detail_page.html怎麼做Django的就地編輯與基於AJAX的Django無端分頁沿着
在在base.html文件模板,extra_header塊前右我:
{% inplace_static %}
我嘗試做的issue_detail_page.html如下:
{% load endless %}
{% load inplace_edit %}
{% lazy_paginate 2 completed_actions using "completed_actions_page" %}
{% for action in completed_actions %}
<tr>
<td><a href="{% url 'action_detail' issuelist.id issue.id action.id %}">{{action.title}}</a></td>
<td>{% inplace_edit "action.owner" %}</td>
<td>{% inplace_edit "action.event_date" %}</td>
<td>{% inplace_edit "action.state" %}</td>
</tr>
{% endfor %}
{% show_more %}
但是Ajax加載的頁面(表格數據)不可編輯。
我檢查了HTML,發現第一/原始表的數據是:
<span class="inplaceedit textinplaceedit enable">
而該網頁後使用AJAX通過點擊「更多」鏈接加載表中的數據:
<span class="inplaceedit textinplaceedit">
有人可以請建議如何使這項工作?