-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a {% render_like %} template tag
{% render_like like %} renders the given like and prints it in the template. The template that it uses depends upon the liked instance, and is either: * phileo/<app>/<model>.html * phileo/<app>/like.html * phileo/like.html This allows for custom like templates on a per model and per application basis.
- Loading branch information
Showing
2 changed files
with
52 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% if instance.get_absolute_url %} | ||
<a class="phileo phileo-{{ like.type }}" href="{{ instance.get_absolute_url }}">{{ instance }}</a> | ||
{% else %} | ||
<span class="phileo phileo-{{ like.type }}" href="{{ instance.get_absolute_url }}">{{ instance }}</span> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters