I tried using {{ candidate.vote_set.filter(vote='TU').count()}} in my view_candidate.html file but it gives me error Could not parse the remainder: (vote='TU').count()
please help me out.. Thanks... django wrote: > hi, > I have a candidate model and a voting model. > Voting model is basically thumps up and down. > > I want to show my voting status in my Candidate profile.. > Right now this is what I am doing > 1) /template/ candidate/view_candidatelist.html > 2) /template/vote/ view_vote.html > > view_candidatelist gives me the list of candidate. > view_vote/<candidate_id> gives me the voting status for that > particular candidate and the view function takes candidate_id as an > argument.. > > My question is how can I display my voting status in my candidatelist. > > View function for vote return the: > render_to_response('templates/vote/view_vote.html', > {'thumbsup_count': tu_count, > 'thumbsdown_count':td_count} > > view function for candidate: > return render_to_response('templates/view_candidatelist.html', > > {'candidateprofile_list':candidateprofile_list}) > > So what should I do to display voting status in candidatelist???? > I tried using {% include "template/view_vote.html %} but it doent > seems to work.. > > Thanks.. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---