README: document the blurp block tag
This commit is contained in:
parent
fce84e9251
commit
d6b960f0e1
23
README
23
README
|
@ -274,8 +274,31 @@ Template::
|
|||
Template tag
|
||||
============
|
||||
|
||||
render_blurp
|
||||
------------
|
||||
|
||||
You can render a block in any template using the template tag ``render_blurp``:
|
||||
|
||||
{% load blurp_tags %}
|
||||
|
||||
{% render_blurp "student_table" %}
|
||||
|
||||
blurp block tag
|
||||
---------------
|
||||
|
||||
You can insert the context generated by a blurp in your current template to do
|
||||
the templating yourself, beware that you will lose ajaxification and dynamic
|
||||
reloading if you use this tag as we cannot send your inline template to the
|
||||
ajax endpoint::
|
||||
|
||||
{% load blurp_tags %}
|
||||
|
||||
{% blurp "student_table %}
|
||||
{% for row in students %}
|
||||
<tr>
|
||||
<td>{{ row.name }}</td>
|
||||
<td>{{ row.age }}</td>
|
||||
<td>{{ row.birthdate }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endblurp %}
|
||||
|
|
Reference in New Issue