changeset 205:c13a3ab314ab

Added RatingField import and fixed an html tag in snippet template
author Ahsan Ali Shahid <ahsan.ali.shahid@gmail.com>
date Fri, 19 Jul 2013 22:40:25 +0500
parents 2619e53b1ec2
children 1f1e867cb37f
files apps/snippet/models.py templates/snippet/snippet_details.djhtml
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/apps/snippet/models.py	Fri Jul 19 22:13:14 2013 +0500
+++ b/apps/snippet/models.py	Fri Jul 19 22:40:25 2013 +0500
@@ -8,7 +8,7 @@
 from mptt.models import MPTTModel, TreeForeignKey
 
 from apps.snippet.highlight import LEXER_DEFAULT, LEXER_LIST, pygmentize
-
+from djangoratings.fields import RatingField
 
 t = 'abcdefghijkmnopqrstuvwwxyzABCDEFGHIJKLOMNOPQRSTUVWXYZ1234567890'
 def generate_secret_id(length=4):
--- a/templates/snippet/snippet_details.djhtml	Fri Jul 19 22:13:14 2013 +0500
+++ b/templates/snippet/snippet_details.djhtml	Fri Jul 19 22:40:25 2013 +0500
@@ -74,9 +74,11 @@
             Language: {{ language }}
             &mdash;
             Number of views: {{ snippet.num_views }}
+            <strong>
             {%  load ratings %}
             Total Votes: {{ snippet.rating.votes }}
             Rating: {{ score }}
+            </strong>
         </div>
     </div><!-- closes .snippet-options -->
     <br />