# HG changeset patch # User Ahsan Ali Shahid # Date 1374252904 -18000 # Node ID c2a1c8950db27c239fdd8313a58cb0ea91e02eca # Parent 49cda19bff99b5a783180d6e09f9419eff51fd62 Added code for Ratings Module to snippets template file diff -r 49cda19bff99 -r c2a1c8950db2 templates/snippet/snippet_details.djhtml --- a/templates/snippet/snippet_details.djhtml Fri Jul 19 21:51:16 2013 +0500 +++ b/templates/snippet/snippet_details.djhtml Fri Jul 19 21:55:04 2013 +0500 @@ -74,6 +74,9 @@ Language: {{ language }} — Number of views: {{ snippet.num_views }} + {% load ratings %} + Total Votes: {{ snippet.rating.votes }} + Rating: {{ score }}
@@ -81,6 +84,16 @@ {% include "snippet/snippet_box.djhtml" with lines=snippet.content_splitted %}
+
+ +
+ {% csrf_token%} +

Rate this Snippet:

+ {{ snippet_form.Rate }} + +
+
+

Comments for this snippet:

{% with snippet as object %}{% include "comments/rawcomment.html" %}{% endwith %}.

{% trans "Revise this snippet" %}