3. Usage

Calling inplace_edit tag you can inplace edit any data from the database. It is important to clarify that the inline edition is not only for text fields, although it may be the more common usage. You can also have inline edition for choices, boolean fields, date and datetime fields, foreing keys, many to many, file and image fields.

{% inplace_edit  "OBJ.FIELD_NAME" %}
{% inplace_edit  "OBJ.FIELD_NAME|FILTER1|FILTER2|...|FILTERN" %}

3.1. Example

{% load inplace_edit %}
   <html>
   <head>
   ...
   <script src="{{ STATIC_URL }}js/jquery.min.js" type="text/javascript"></script>
   {% inplace_toolbar %}
   </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>
       ...
   </body>
   </html>

3.1.1. How to use it

Project Versions

Table Of Contents

Previous topic

2. Install

Next topic

4. Advanced Usage

This Page