This simple returns the count of likes for a given object:

{{ obj|likes_count }}

Template Tags


An assignment tag that fetches a list of likes for a given object:

{% who_likes car as car_likes %}

{% for like in car_likes %}
    <div class="like">{{ like.sender.get_full_name }} likes {{ car }}</div>
{% endfor %}


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

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

The render_like tag looks in the following places for the template to render. Any of them can be overwritten as needed, allowing you to customize 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


This renders a fragment of html that will be what the user will click on to unlike or like objects. It only has two required parameters, which are the user and the object.:

{% phileo_widget user object %}

It renders “phileo/_widget.html” and can be overridden as desired.


Same, functionally, as phileo_widget, except that it renders “phileo/_widget_brief.html” instead.


The “liked” template tag will decorate an iterable of objects given a particular user, with a “liked” boolean indicating whether or not the user likes each object in the iterable:

{% liked objects by request.user as varname %}
{% for obj in varname %
    <div>{% if obj.liked %}* {% endif %}{{ obj.title }}</div>
{% endfor %}


The “likes” tag will fetch into a context variable a list of objects that the given user likes:

{% likes request.user "app.Model" as objs %}
{% for obj in objs %}
    <div>{{ obj }}</div>
{% endfor %}