无法让django-inplaceedit工作

时间:2013-11-12 23:47:39

标签: django django-templates edit-in-place django-inplaceedit

我的HTML模板顶部包含:

{% load inplace_edit %}

标题部分包含:

{% inplace_static %}

然后在我的身体内容中我正在做:

{% inplace_edit "action.action_state" %}

但它不起作用。我安装了:

'bootstrap3',
'inplaceeditform_bootstrap',   # it is very important that this app is placed before inplaceeditform and inplaceeditform_extra_fields
'inplaceeditform',
'inplaceeditform_extra_fields',
'bootstrap3_datetime',

我已尝试'django.template.loaders.eggs.Loader',启用和停用。

它显示为可点击的文字,但是当我点击/双击时没有任何反应。我如何让它工作?

谢谢,

HEC

1 个答案:

答案 0 :(得分:1)

在尝试@ Goin的建议后,我发现我的JQuery文件没有被正确导入。不得不搬家:

<script type="text/javascript" charset="utf-8" src="{% static 'srt/js/jquery-1.10.2.min.js' %}"></script>
<script type="text/javascript" charset="utf-8" src="{% static 'srt/js/jquery-ui.min.js' %}"></script>

到我标题栏的顶部。任何使用Bootstrap的人,请确保将JQuery作为模板中的第一件事进行导入。

由于