Hi there, I think that you would need to get the count of votes for each poll, add all votes and use the formula:
vote_percentage = (poll_votes/total_poll_votes)*100 On Thu, Mar 31, 2011 at 8:33 AM, cha <mohamma...@gmail.com> wrote: > ok in beginning > how i can get percentage for each vote ? > > this result code > > def results(request, poll_id): > p = get_object_or_404(Poll, pk=poll_id) > return render_to_response('polls/results.html', {'poll': p}) > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- Regards, Sithembewena Lloyd Dube -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.