comment.poll auto_id uniqueness

This commit is contained in:
nitely 2015-10-09 00:13:55 -03:00
parent c6623362f3
commit 56626f9b51

View File

@ -18,6 +18,7 @@ class PollVoteManyForm(forms.Form):
def __init__(self, poll, user=None, *args, **kwargs):
super(PollVoteManyForm, self).__init__(*args, **kwargs)
self.auto_id = 'id_poll_{pk}_%s'.format(pk=poll.pk) # Uniqueness "<label for=id_poll_pk_..."
self.user = user
self.poll = poll
self.poll_choices = getattr(poll, 'choices', poll.poll_choices.unremoved())