django-inplace编辑删除顶部的提示
-
22-12-2019 - |
题
我刚开始使用最新版本的django-inplaceedit。效果很好。
但我想删除它在显示可编辑项目时显示的提示-'启用内联编辑'。有没有简单的方法来删除它?
顺便说一句,我搜索了文档,因为有没有办法到达与django-inplaceedit相关的邮件列表
解决方案
这是 相关网页 在文档中,对于将来遇到这个问题的任何人。
在文档中查看该页面的以下代码示例,用于将inplace-edit的css放在标题中,并将js放在正文中。
{% load inplace_edit %}
<html>
<head>
...
{% inplace_css 1 %} {% comment %} or inplace_css 0 {% endcomment %}
</head>
<body>
...
<div id="content">
...
{% inplace_edit "content.name" %}
...
<div class="description">
{% inplace_edit "content.date_initial|date:'d m Y'" %}
{% inplace_edit "content.description|safe" %}
</div>
<div class="body">
{% inplace_edit "content.body|safe|truncatewords_html:15" %}
</div>
</div>
...
<script src="{{ STATIC_URL }}js/jquery.min.js" type="text/javascript"></script>
{% inplace_js 1 1 %} {% comment %} or inplace_js 1 0 {% endcomment %}
</body>
</html>
简单更换 {% inplace_css 1 %}
与 {% inplace_css 0 %}
和 {% inplace_js 1 1 %}
与 {% inplace_js 1 0 %}
在上面的例子中,这应该在inplaceedit的v1.3.0中完成。
不隶属于 StackOverflow