i am stuck on this issue for a while.
i have a location in database which can be rated by user using star rating. Then i will save that rate into database. e.g. 1, or 2 till 5 since it is a 5-star-rating system. okay, this is fine.
but now i cannot render that number back to stars again, i want to show all locations which are in DB with their own rated stars. object.rated = 5
my vision for my views.py:
all_locations_from_db = Location.objects.all()
return render_to_response('resultpage.html',{'all':all_locations_from_db},context_instance=RequestContext(request))
and this would be my html:
{% if all %}
{% for every in all %}
{{ how can i render that number back to 5-star form again?? }}
{% endfor %}
{% endif %}
this is my problem now. can someone please help me? i didnot do anything yet, cos i dont know how to do it..
thanks a lot