1

I am using django-star ratings and its working fine but along with stars its also showing additional details. I am just writing

{% ratings object 18 18 %}

in my HTML and its showing me starts but also

Average: 4.50

Rating Count: 2

You Rated: Not rated

Please log in to rate.

I have read the documentation but I am unable to find anything. I don't want to show this additional details on list page of items but want on detail page of that item.

Community
  • 1
  • 1
Pankaj Sharma
  • 2,185
  • 2
  • 24
  • 50

1 Answers1

1

You need to create your own star_ratings/widget.html showing the detail you want to be shown.

Take a look at star_ratings/widget_base.html and you can see all the fields being shown. Simply include what you want in star_ratings/widget.html which extends star_ratings/widget_base.html and you should be able to include only the results you want.

HenryM
  • 5,557
  • 7
  • 49
  • 105
  • Thanks for reply, this is working fine but as I already mentioned that - I don't want show additional detail in my list page but yes for detail page of that Item. This new widget.html (without details) is also active in my detail page that I don't want, is there any way to include required widget items in that page only? – Pankaj Sharma Apr 14 '18 at 04:42