Skip to content

Commit

Permalink
Updated the docs with the new template tag
Browse files Browse the repository at this point in the history
  • Loading branch information
askeyt committed Nov 29, 2011
1 parent 883b32f commit 701646a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
24 changes: 23 additions & 1 deletion docs/templatetags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,28 @@ This renders some css style sheets that will style the widget.::

It renders "phileo/_css.html" and can be overridden as desired.

render_like
-----------

This renders a like, so that you can provide a list of likes. It
combines well with `likes`.::

{% likes user as like_list %}
<ul>
{% for like in like_list %}
<li>{% render_like like %}</li>
{% endfor %}
</ul>

The `render_like` tag looks in the following place for the template to
render. Any of them can be overwritten as needed, allowing you to
customise the rendering of the like on a per model and per application
basis:

* phileo/app_name/model.html
* phileo/app_name/like.html
* phileo/_like.html

phileo_js
---------

Expand All @@ -33,7 +55,7 @@ This renders some script tags that are needed to make the widget work.::
It renders "phileo/_js.html" and can be overridden as desired.


likes_widget
phileo_widget
------------

This renders a fragement of html that will be what the user will click
Expand Down
2 changes: 1 addition & 1 deletion phileo/templatetags/phileo_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def render_like(parser, token):
{% likes user as like_list %}
<ul>
{% for like in like_list %}
{% render_like like %}
<li>{% render_like like %}</li>
{% endfor %}
</ul>
"""
Expand Down

0 comments on commit 701646a

Please sign in to comment.