Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Detailt, the doc and the testing project had a bug: 'filters_to_show'…

… should be 'filters_to_edit'
  • Loading branch information...
commit 0c26a57f6972896c64a7d102807952ddc9736e8f 1 parent 1a6de0e
Pablo Martín goinnn authored
3  docs/advanced_usage.rst
View
@@ -10,7 +10,7 @@ Inplaceedit has some optionals parameters that the templatetag can receive to ch
* min_width: The minimum of the width's widget
* class_inplace: Add a class to edit inline form.
* tag_name_cover: The value is covered for a span. But it's possible to change it.
- * filters_to_show: The server filters the value before to save. List separate for "|"
+ * filters_to_edit: The server filters the value before to save. List separate for "|"
* loads: If you use some filter that need a load, you set this option. List separate for ":"
* edit_empty_value: The text to display when the field is empty
@@ -23,6 +23,7 @@ Examples
{% inplace_edit "content.title" class_inplace="titleFormEditInline" %}
{% inplace_edit "content.description|safe|truncatewords_html:30" tag_name_cover="div" %}
{% inplace_edit "content.description|my_filter" loads="my_template_tag" %}
+ {% inplace_edit "content.description|my_filter" filters_to_edit="slice:'10'|truncatewords:'2'%}
{% inplace_edit "content.index" edit_empty_value="This is a editable content, now the value is none. Please double click to edit inplace" %}
{% inplace_edit "content.amount" min_width="100" %}
4 testing/testing/multimediaresources/templates/multimediaresources/edit.html
View
@@ -12,7 +12,7 @@
<div>
<ul>
<li>{% trans "Name (CharField): " %}{% inplace_edit "resource.name" %}</li>
- <li>{% trans "Name, option auto size (CharField):" %}{% inplace_edit "resource.name" auto_height=1, auto_width=1, filters_to_show="slice:1" %}</li>
+ <li>{% trans "Name, option auto size (CharField) and slice (10 chars) when saving:" %}{% inplace_edit "resource.name" auto_height=1, auto_width=1, filters_to_edit="slice:'10'|truncatewords:2" %}</li>
<li>{% trans "Name, only a simpleclick to inplaceedit and auto save (CharField):" %}{% inplace_edit "resource.name" eventInplaceEdit="click", autoSave="1" %}</li>
<li>{% trans "Description with safe filter (TextField):" %}{% inplace_edit "resource.description|safe" %}</li>
<li>{% trans "Description with safe filter and option auto size (TextField):" %}{% inplace_edit "resource.description|safe" auto_height=1, auto_width=1 %}</li>
@@ -23,7 +23,7 @@
<li>{% trans "Status tag_name_cover option (CharField, choices):" %}{% inplace_edit "resource.status" tag_name_cover="div" %}</li>
<li>{% trans "Status slice filter (CharField, choices):" %}{% inplace_edit "resource.status|slice:'5'" %}</li>
<li>{% trans "Type of resource (ForeignKey):" %}{% inplace_edit "resource.resource_type" %}</li>
- <li>{% trans "Type of resource truncatewords html option (ForeignKey):" %}{% inplace_edit "resource.resource_type|truncatewords_html:1" %}</li>
+ <li>{% trans "Type of resource truncatewords html option (ForeignKey):" %}{% inplace_edit "resource.resource_type|truncatewords_html:'1'" %}</li>
<li>{% trans "Owner (ManyToManyField):" %}{% inplace_edit "resource.owner" %}</li>
<li>{% trans "Owner truncatewords html option (ManyToManyField):" %}{% inplace_edit "resource.owner|truncatewords_html:1" %}</li>
<li>{% trans "Amount (IntegerField):" %}{% inplace_edit "resource.amount" %}</li>
Please sign in to comment.
Something went wrong with that request. Please try again.