【发布时间】:2014-05-12 21:38:19
【问题描述】:
基于 AJAX 的 django 无尽分页有 2 个模板: 1.主要issue_detail.html 2.分页模板issue_detail_page.html
在 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">
有人可以建议如何进行这项工作吗?
【问题讨论】:
标签: javascript ajax django django-endless-pagination django-inplaceedit