DJango upvoting, downvoting - functions in templates
169 views
Skip to first unread message
Jan Gregorczyk
unread,
Jun 2, 2020, 10:05:33 AM6/2/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
I'm using this package https://pypi.org/project/django-vote/ and i want to do something smilar to this guy https://github.com/shellfly/django-vote/issues/51 - I need function callable in template, which will tell me if user has downvoted or upvoted, but exactly downvoted or exactly upvoted. I don't know where should I put it's code to make it work. It should take two arguments: user_id and answer.