'Return whether we should render the vote form for the document.'

def allows_vote(self, request):

    authed_and_voted = (request.user.is_authenticated() and self.current_revision and self.current_revision.has_voted(request))
    return ((not self.is_archived) and self.current_revision and (not authed_and_voted) and (not self.redirect_document()) and (self.category != TEMPLATES_CATEGORY) and (not waffle.switch_is_active('hide-voting')))
