def poll(poll_id): poll = Poll.get_poll_by_id(poll_id) if not poll: return abort(404) choices = Choice.get_choices_for_poll(poll) return views.view_poll(poll, choices)
def poll(poll_id): poll = Poll.get_poll_by_id(poll_id) if not poll: return abort(404) choices = Choice.get_choices_for_poll(poll) #csrf_token = generate_csrf() return views.view_poll(poll, choices, csrf_token=None)
def poll(poll_id): poll = Poll.get_or_none(Poll.id == poll_id) if not poll: return abort(404) return views.view_poll(poll)